-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Attempting destructuring of struct reference to mutable variable results in partial moves of fields #102669
Comments
Triage: Addressed by rust-lang/rfcs#3627 (see various referenced issues). Closing as duplicate. |
I don't think this issue should be closed until the referenced RFC is stabilized. This issue still reproduces on all version of Rust, afaict? |
Hmm, you are right. We should probably create a label to make it easy to track bugs related to the implementation. |
it's not a bug, it's just not stable behavior yet. It's gated behind a feature. |
This is a duplicate of #105647 though |
Closing in favor of: |
I tried this code:
I expected to see this happen: The above should compile with
bar
being a mutable variable of type&Bar
Instead, this happened: The above fails to compile with
bar
being a mutable variable of typeBar
.Meta
rustc --version --verbose
:Backtrace
playground
The text was updated successfully, but these errors were encountered: