]> git.lizzy.rs Git - rust.git/blob - src/test/ui/assign-imm-local-twice.stderr
Rollup merge of #104849 - GuillaumeGomez:source-code-sidebar-css-migration, r=notriddle
[rust.git] / src / test / 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`.