]> git.lizzy.rs Git - rust.git/blob - tests/ui/assign-imm-local-twice.stderr
Auto merge of #106833 - JohnTitor:rollup-z8398jk, r=JohnTitor
[rust.git] / tests / ui / assign-imm-local-twice.stderr
1 error[E0384]: cannot assign twice to immutable variable `v`
2   --> $DIR/assign-imm-local-twice.rs:7:5
3    |
4 LL |     let v: isize;
5    |         - help: consider making this binding mutable: `mut v`
6 ...
7 LL |     v = 1;
8    |     ----- first assignment to `v`
9 LL |     println!("v={}", v);
10 LL |     v = 2;
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`.