]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / unboxed-closures / unboxed-closures-mutate-upvar.nll.stderr
index f765f207303d2dd1b9bc74ee926c75820baf9469..9858b8db2112d1ae6a819e985c8ec0626821934d 100644 (file)
@@ -1,4 +1,4 @@
-error[E0594]: cannot assign to `n`, as it is not declared as mutable
+warning[E0594]: cannot assign to `n`, as it is not declared as mutable
   --> $DIR/unboxed-closures-mutate-upvar.rs:25:9
    |
 LL |     let n = 0;
@@ -6,6 +6,10 @@ LL |     let n = 0;
 LL |     let mut f = to_fn_mut(|| { //~ ERROR closure cannot assign
 LL |         n += 1;
    |         ^^^^^^ cannot assign
+   |
+   = warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
+           It represents potential unsoundness in your code.
+           This warning will become a hard error in the future.
 
 error[E0594]: cannot assign to `n`, as it is not declared as mutable
   --> $DIR/unboxed-closures-mutate-upvar.rs:42:9
@@ -40,6 +44,6 @@ LL | |         n += 1; //~ ERROR cannot assign
 LL | |     });
    | |_____^
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0594`.