about summary refs log tree commit diff
path: root/src/test/ui/closure-immutable-outer-variable.nll.stderr
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2018-07-17 20:29:48 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2018-07-20 20:01:15 +0100
commita06b2433fc2963dba4ef25deee6720c63ffcc03b (patch)
treec9136001bb8d382658622906043b0d18c6ec4f12 /src/test/ui/closure-immutable-outer-variable.nll.stderr
parent13b5f69848bf4ba9213fa60e7873f6ff51fc3afc (diff)
downloadrust-a06b2433fc2963dba4ef25deee6720c63ffcc03b.tar.gz
rust-a06b2433fc2963dba4ef25deee6720c63ffcc03b.zip
Update tests for new NLL mutability errors
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