rebinding values in an async function can double the memory usage #96084
Labels
A-async-await
Area: Async & Await
AsyncAwait-Polish
Async-await issues that are part of the "polish" area
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
Projects
Rebinding a value within an async function can cause the generated future to require twice the memory for the value. This seems to only happen if the value was borrowed earlier:
Playground link.
I don't know if this counts as a bug but the behavior is a bit surprising.
The effect is present in both debug and release modes with rustc 1.60.0.
The text was updated successfully, but these errors were encountered: