]> git.lizzy.rs Git - rust.git/blob - src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.nll.stderr
091547ed1228a85fbb709a5de7fbd04ebc163f68
[rust.git] / src / test / ui / liveness / liveness-assign / liveness-assign-imm-local-in-op-eq.ast.nll.stderr
1 error[E0384]: cannot assign twice to immutable variable `v`
2   --> $DIR/liveness-assign-imm-local-in-op-eq.rs:19:5
3    |
4 LL |     let v: isize;
5    |         - consider changing this to `mut v`
6 LL |     //[mir]~^ NOTE consider changing this to `mut v`
7 LL |     v = 2;  //[ast]~ NOTE first assignment
8    |     ----- first assignment to `v`
9 LL |             //[mir]~^ NOTE first assignment
10 LL |     v += 1; //[ast]~ ERROR cannot assign twice to immutable variable
11    |     ^^^^^^ cannot assign twice to immutable variable
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0384`.