-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Autoderef chooses deref() when deref_mut() is needed for ref mut pattern #15609
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
Comments
This is possibly related to #12825. |
Ah, I completely missed the fact that expressions matched over are lvalues that could require mutability (so they should always prefer |
Triage: Still occurs with: rustc 0.13.0-dev (97a57ec90 2014-11-07 11:31:25 +0000) #12825 has been closed as fixed. |
Triage: still happens |
Still an issue in rustc 1.0.0-nightly (083b8a4 2015-04-05) (built 2015-04-05) |
Added LvaluePreference::from_mutbl Closes rust-lang#15609
For those who wonder: The fix will be in Rust 1.2. |
Remove most of the duplication from `Semantics{,Impl}` via deref See https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Semantics.20vs.20SemanticsImpl/near/390795952
Changing to
match b.deref_mut().node
fixes the error.The text was updated successfully, but these errors were encountered: