1
Fork 0
rust/src/test/ui/borrowck/immutable-arg.stderr

20 lines
602 B
Text
Raw Normal View History

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) {
| -- first assignment to `_x`
2018-02-23 03:42:32 +03:00
LL | _x = 4;
| ^^^^^^ cannot assign twice to immutable variable
2018-01-09 19:10:45 -08:00
error[E0384]: cannot assign to immutable argument `_x` (Mir)
--> $DIR/immutable-arg.rs:14:5
|
2018-02-23 03:42:32 +03:00
LL | fn foo(_x: u32) {
| -- argument not declared as `mut`
2018-02-23 03:42:32 +03:00
LL | _x = 4;
| ^^^^^^ cannot assign to immutable argument
error: aborting due to 2 previous errors
2018-02-19 21:40:25 +01:00
If you want more information on this error, try using "rustc --explain E0384"