-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Wrong mut &mut self
suggestion
#34126
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
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
cc @birkenfeld |
This is due to the change in how self arguments are represented. Now we can probably properly check, I'll have a look. |
Possibly related? #34337 |
bors
added a commit
that referenced
this issue
Nov 12, 2016
Fix invalid "ref mut mut" sugestion Change output from: ```nocode error: cannot borrow immutable local variable `x` as mutable --> <anon>:12:23 | 11 | TestEnum::Item(ref mut x) => { | --------- use `ref mut mut x` here to make mutable 12 | test(&mut x); | ^ cannot borrow mutably ``` to ```nocode error: cannot borrow immutable local variable `x` as mutable --> <anon>:12:23 | 12 | test(&mut x); | ^ | | | cannot reborrow mutably | try removing `&mut` here ``` Fixes #37139, #34337, #34126
Fixed by #37531 it seems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found wrong suggestion with the following code (play):
stable release prints like in #31424:
but nightly takes suggestion to use
mut &mut self
:The text was updated successfully, but these errors were encountered: