Skip to content
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

Merged
merged 1 commit into from
Jan 17, 2018
Merged

Add NLL test for #45045 #47456

merged 1 commit into from
Jan 17, 2018

Conversation

chrisvittal
Copy link
Contributor

@chrisvittal chrisvittal commented Jan 15, 2018

cc #45045
Part of #47366

r? @nikomatsakis

let g = f;
match e {
Xyz::A => println!("a"),
//~^ cannot use `e` because it was mutably borrowed [E0503]
Copy link
Member

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...

Copy link
Contributor

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]
Copy link
Contributor

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

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 16, 2018

📌 Commit f9e1b9c has been approved by nikomatsakis

@kennytm kennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 17, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jan 17, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jan 17, 2018
bors added a commit that referenced this pull request Jan 17, 2018
@bors bors merged commit f9e1b9c into rust-lang:master Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants