2017-11-20 20:13:27 +08:00
|
|
|
error[E0384]: cannot assign twice to immutable variable `x`
|
2018-12-25 23:56:47 +08:00
|
|
|
--> $DIR/command-line-diagnostics.rs:6:5
|
2017-11-20 20:13:27 +08:00
|
|
|
|
|
2018-02-25 07:59:34 +08:00
|
|
|
LL | let x = 42;
|
2024-07-04 05:01:29 +08:00
|
|
|
| - first assignment to `x`
|
2018-02-25 07:59:34 +08:00
|
|
|
LL | x = 43;
|
2017-11-20 20:13:27 +08:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
2024-07-04 05:01:29 +08:00
|
|
|
|
|
|
|
|
help: consider making this binding mutable
|
|
|
|
|
|
|
|
|
LL | let mut x = 42;
|
|
|
|
| +++
|
2017-11-20 20:13:27 +08:00
|
|
|
|
2023-11-21 23:44:16 +08:00
|
|
|
error: aborting due to 1 previous error
|
2017-11-20 20:13:27 +08:00
|
|
|
|
2018-03-03 22:59:40 +08:00
|
|
|
For more information about this error, try `rustc --explain E0384`.
|