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

the test(s) from issue 25579 should be ported to NLL run-pass tests #55797

Closed
pnkfelix opened this issue Nov 8, 2018 · 1 comment
Closed
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. fixed-by-NLL Bugs fixed, but only when NLL is enabled.

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Nov 8, 2018

The work on reviewing the diagnostic differences between AST-borrowck and NLL leads me to conclude that NLL is (probably) correctly accepting the regression test we added for #25579

Namely this:

enum Sexpression {
Num(()),
Cons(&'static mut Sexpression)
}
fn causes_error_in_ast(mut l: &mut Sexpression) {
loop { match l {
&mut Sexpression::Num(ref mut n) => {},
&mut Sexpression::Cons(ref mut expr) => { //[ast]~ ERROR [E0499]
l = &mut **expr; //[ast]~ ERROR [E0506]
}
}}
}

We should make the original test be AST-borrowck only (via -Z borrowck=ast) and make a new version of the test (and perhaps the original code from the description on #25579) that is NLL-only and goes in run-pass.

@estebank estebank added E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. fixed-by-NLL Bugs fixed, but only when NLL is enabled. labels Nov 8, 2018
@pnkfelix
Copy link
Member Author

This bug is so old that NLL migrate mode has already been enabled on all editions (PR #59114), and that PR revised the linked test to be // compile-pass.

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. fixed-by-NLL Bugs fixed, but only when NLL is enabled.
Projects
None yet
Development

No branches or pull requests

2 participants