about summary refs log tree commit diff
path: root/src/test/ui/closure-immutable-outer-variable.nll.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/closure-immutable-outer-variable.nll.stderr')
-rw-r--r--src/test/ui/closure-immutable-outer-variable.nll.stderr4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/ui/closure-immutable-outer-variable.nll.stderr b/src/test/ui/closure-immutable-outer-variable.nll.stderr
index 335ccefe8a0..d91c1199b3f 100644
--- a/src/test/ui/closure-immutable-outer-variable.nll.stderr
+++ b/src/test/ui/closure-immutable-outer-variable.nll.stderr
@@ -1,6 +1,8 @@
-error[E0594]: cannot assign to immutable item `y`
+error[E0594]: cannot assign to `y`, as it is not declared as mutable
   --> $DIR/closure-immutable-outer-variable.rs:21:26
    |
+LL |     let y = true;
+   |         - help: consider changing this to be mutable: `mut y`
 LL |     foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable
    |                          ^^^^^^^^^ cannot assign