creating mutable variable of reference in destructuring of tuple containing one immovable (!Copy) object causes E0507
: cannot move out of shared reference and incorrect help diagnostic
#124600
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
let (ref mut _x,) = (&Hi,);
causes an errorRust Version
Anything else?
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9670d1424d20a93ed49b9bc818f4e0a4
The text was updated successfully, but these errors were encountered: