]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / borrowck / issue-55492-borrowck-migrate-scans-parents.rs
index fe7ed8ed3fa248cf2769f5c2e248430a6964daf7..b3cce1b3a06117dded43fc92377fdeb969133e27 100644 (file)
@@ -2,21 +2,12 @@
 // analysis of a closure body may only be caught when AST-borrowck
 // looks at some parent.
 
-// revisions: migrate nll
-//[nll]compile-flags: -Z borrowck=mir
-
-// Since we are testing nll (and migration) explicitly as a separate
-// revisions, don't worry about the --compare-mode=nll on this test.
-
-// ignore-compare-mode-nll
-
 // transcribed from borrowck-closures-unique.rs
 mod borrowck_closures_unique {
     pub fn e(x: &'static mut isize) {
         static mut Y: isize = 3;
         let mut c1 = |y: &'static mut isize| x = y;
-        //[migrate]~^ ERROR is not declared as mutable
-        //[nll]~^^ ERROR is not declared as mutable
+        //~^ ERROR is not declared as mutable
         unsafe { c1(&mut Y); }
     }
 }
@@ -26,8 +17,7 @@ mod borrowck_closures_unique_grandparent {
         static mut Z: isize = 3;
         let mut c1 = |z: &'static mut isize| {
             let mut c2 = |y: &'static mut isize| x = y;
-        //[migrate]~^ ERROR is not declared as mutable
-        //[nll]~^^ ERROR is not declared as mutable
+        //~^ ERROR is not declared as mutable
             c2(z);
         };
         unsafe { c1(&mut Z); }
@@ -38,23 +28,19 @@ mod borrowck_closures_unique_grandparent {
 mod mutability_errors {
     pub fn capture_assign_whole(x: (i32,)) {
         || { x = (1,); };
-        //[migrate]~^ ERROR is not declared as mutable
-        //[nll]~^^ ERROR is not declared as mutable
+        //~^ ERROR is not declared as mutable
     }
     pub fn capture_assign_part(x: (i32,)) {
         || { x.0 = 1; };
-        //[migrate]~^ ERROR is not declared as mutable
-        //[nll]~^^ ERROR is not declared as mutable
+        //~^ ERROR is not declared as mutable
     }
     pub fn capture_reborrow_whole(x: (i32,)) {
         || { &mut x; };
-        //[migrate]~^ ERROR is not declared as mutable
-        //[nll]~^^ ERROR is not declared as mutable
+        //~^ ERROR is not declared as mutable
     }
     pub fn capture_reborrow_part(x: (i32,)) {
         || { &mut x.0; };
-        //[migrate]~^ ERROR is not declared as mutable
-        //[nll]~^^ ERROR is not declared as mutable
+        //~^ ERROR is not declared as mutable
     }
 }