summary refs log tree commit diff
path: root/src/test/ui/borrowck/immutable-arg.stderr
blob: 06ae5cdbcc63bac03f2e400fb818206c92d54b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0384]: cannot assign twice to immutable variable `_x` (Ast)
  --> $DIR/immutable-arg.rs:14:5
   |
LL | fn foo(_x: u32) {
   |        -- first assignment to `_x`
LL |     _x = 4;
   |     ^^^^^^ cannot assign twice to immutable variable

error[E0384]: cannot assign to immutable argument `_x` (Mir)
  --> $DIR/immutable-arg.rs:14:5
   |
LL | fn foo(_x: u32) {
   |        -- help: make this binding mutable: `mut _x`
LL |     _x = 4;
   |     ^^^^^^ cannot assign to immutable argument

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0384`.