-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Attempting destructuring of struct reference to mutable variable results in partial moves of fields #102669
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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: