-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.fixed-by-NLLBugs fixed, but only when NLL is enabled.Bugs fixed, but only when NLL is enabled.
Description
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:
rust/src/test/ui/issues/issue-25579.rs
Lines 16 to 28 in 653da4f
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.fixed-by-NLLBugs fixed, but only when NLL is enabled.Bugs fixed, but only when NLL is enabled.