-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add NLL test for #45045 #47456
Add NLL test for #45045 #47456
Conversation
let g = f; | ||
match e { | ||
Xyz::A => println!("a"), | ||
//~^ cannot use `e` because it was mutably borrowed [E0503] |
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.
huh... the error message points at the first arm, not the use of e
in match e
itself on line 24? I wonder if we should consider that a bug...
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.
Huh, good question. I can see it being surprising, though of course it also makes sense. Obviously it'd be a separate thing to fix though
let g = f; | ||
match e { | ||
Xyz::A => println!("a"), | ||
//~^ cannot use `e` because it was mutably borrowed [E0503] |
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.
Huh, good question. I can see it being surprising, though of course it also makes sense. Obviously it'd be a separate thing to fix though
@bors r+ |
📌 Commit f9e1b9c has been approved by |
Add NLL test for rust-lang#45045 cc rust-lang#45045 Part of rust-lang#47366 r? @nikomatsakis
Add NLL test for rust-lang#45045 cc rust-lang#45045 Part of rust-lang#47366 r? @nikomatsakis
cc #45045
Part of #47366
r? @nikomatsakis