]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/assign-imm-local-twice.rs
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
[rust.git] / src / test / ui / assign-imm-local-twice.rs
index de966a17857c652febfbdd5fced430d9afc3c03e..b50f6ab5deb1569624f34c9bfddcb90e72be94be 100644 (file)
@@ -1,17 +1,11 @@
-// revisions: ast mir
-//[mir]compile-flags: -Zborrowck=mir
-
 fn test() {
     let v: isize;
-    //[mir]~^ HELP make this binding mutable
-    //[mir]~| SUGGESTION mut v
-    v = 1; //[ast]~ NOTE first assignment
-           //[mir]~^ NOTE first assignment
+    //~^ HELP consider making this binding mutable
+    //~| SUGGESTION mut v
+    v = 1; //~ NOTE first assignment
     println!("v={}", v);
-    v = 2; //[ast]~ ERROR cannot assign twice to immutable variable
-           //[mir]~^ ERROR cannot assign twice to immutable variable `v`
-           //[ast]~| NOTE cannot assign twice to immutable
-           //[mir]~| NOTE cannot assign twice to immutable
+    v = 2; //~ ERROR cannot assign twice to immutable variable
+           //~| NOTE cannot assign twice to immutable
     println!("v={}", v);
 }