2018-01-07 17:02:26 -08:00
|
|
|
error[E0384]: cannot assign twice to immutable variable `_x` (Ast)
|
|
|
|
--> $DIR/immutable-arg.rs:14:5
|
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | fn foo(_x: u32) {
|
2018-01-07 17:02:26 -08:00
|
|
|
| -- first assignment to `_x`
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | _x = 4;
|
2018-01-07 17:02:26 -08:00
|
|
|
| ^^^^^^ cannot assign twice to immutable variable
|
|
|
|
|
2018-01-09 19:10:45 -08:00
|
|
|
error[E0384]: cannot assign to immutable argument `_x` (Mir)
|
2018-01-07 17:02:26 -08:00
|
|
|
--> $DIR/immutable-arg.rs:14:5
|
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | fn foo(_x: u32) {
|
2018-06-15 05:49:29 +02:00
|
|
|
| -- consider changing this to `mut _x`
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | _x = 4;
|
2018-01-07 17:02:26 -08:00
|
|
|
| ^^^^^^ cannot assign to immutable argument
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0384`.
|