-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Fix variable name in E0502 double borrow error #51651
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
Conversation
aaa07b5
to
68b477e
Compare
impl Foo { | ||
fn foo(&mut self) { | ||
self.thing.bar(|| { | ||
//~^ ERROR cannot borrow `self.thing` as mutable because it is also borrowed as immutable [E0502] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are still checking for self.thing
, which is probably also why the tests are failing ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that part is correct -- the main error still talks about self.thing
.
This is the relevent part of the log:
(cc @TimNN -- jfyi the bot failed to extract this particular error) |
68b477e
to
3d31e5f
Compare
@bors r+ |
📌 Commit 3d31e5f has been approved by |
Fix variable name in E0502 double borrow error Closes #51268 r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
Closes #51268
r? @nikomatsakis