-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rebinding values in an async function can double the memory usage #96084
Comments
@rustbot label A-async-await AsyncAwait-Polish |
We discussed this in triage today. It seems like the issue is probably that @rustbot label +AsyncAwait-Triaged |
In #60187 I think I attempted making a MIR building change that caused |
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: