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 tests for #46557 and #38899 #47368

Merged
merged 2 commits into from
Jan 15, 2018
Merged

Conversation

chrisvittal
Copy link
Contributor

@chrisvittal chrisvittal commented Jan 11, 2018

This adapts the sample code from the two issues into test code.

Closes #46557
Closes #38899

r? @nikomatsakis

Closes rust-lang#47366

Adapt the sample code from the issues into mir-borrowck/nll test cases.
@chrisvittal
Copy link
Contributor Author

The mentoring instructions were unclear here. It seems that we want these tests to fail compilation as they both unsoundly passed AST borrowck.

@pnkfelix
Copy link
Member

pnkfelix commented Jan 12, 2018

@chrisvittal When you said the instructions were unclear, were you referring to the step that said that the tests should include the comment // must-compile-successfully ? (Because I would agree that was an odd thing to mention, since the two cases that @nikomatsakis listed are ones where the whole point is that they start failing to compile under #![feature(nll)])

@pnkfelix
Copy link
Member

Also I think the intention is that this PR should be closing #46557 and #38899 . I don't know if it is premature to close #47366 as well, though I guess we can always reopen it if we find other MIR issues...

@nikomatsakis
Copy link
Contributor

That was a mistake on my part. We expect errors!

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also remove flags from other test)


// Regression test for issue #38899

// compile-flags:-Znll -Zborrowck=mir -Zverbose
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove the compile-flags? They should not be necessary. feature(nll) should suffice.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 12, 2018

📌 Commit e14720b has been approved by nikomatsakis

@shepmaster shepmaster added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 13, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jan 15, 2018
Add NLL tests for rust-lang#46557 and rust-lang#38899

This adapts the sample code from the two issues into test code.

Closes rust-lang#46557
Closes rust-lang#38899

r? @nikomatsakis
bors added a commit that referenced this pull request Jan 15, 2018
Rollup of 10 pull requests

- Successful merges: #47120, #47126, #47277, #47330, #47368, #47372, #47414, #47417, #47432, #47443
- Failed merges: #47334
@bors bors merged commit e14720b into rust-lang:master Jan 15, 2018
@chrisvittal chrisvittal deleted the nll-tests branch January 15, 2018 15:46
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