]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/immutable-arg.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / immutable-arg.stderr
1 error[E0384]: cannot assign twice to immutable variable `_x` (Ast)
2   --> $DIR/immutable-arg.rs:14:5
3    |
4 LL | fn foo(_x: u32) {
5    |        -- first assignment to `_x`
6 LL |     _x = 4;
7    |     ^^^^^^ cannot assign twice to immutable variable
8
9 error[E0384]: cannot assign to immutable argument `_x` (Mir)
10   --> $DIR/immutable-arg.rs:14:5
11    |
12 LL | fn foo(_x: u32) {
13    |        -- help: make this binding mutable: `mut _x`
14 LL |     _x = 4;
15    |     ^^^^^^ cannot assign to immutable argument
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0384`.