2018-08-08 14:28:26 +02:00
|
|
|
error[E0384]: cannot assign twice to immutable variable `v`
|
2019-04-22 08:40:08 +01:00
|
|
|
--> $DIR/assign-imm-local-twice.rs:7:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let v: isize;
|
2018-09-12 14:13:40 -04:00
|
|
|
| - help: make this binding mutable: `mut v`
|
|
|
|
...
|
2019-03-17 10:52:07 +01:00
|
|
|
LL | v = 1;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ----- first assignment to `v`
|
2019-04-22 08:40:08 +01:00
|
|
|
LL | println!("v={}", v);
|
2019-03-17 10:52:07 +01:00
|
|
|
LL | v = 2;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0384`.
|