]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0384]: cannot assign twice to immutable variable `b` |
48663c56 | 2 | --> $DIR/issue-45199.rs:6:5 |
8faf50e0 XL |
3 | | |
4 | LL | let b: Box<isize>; | |
cdc7bbd5 | 5 | | - help: consider making this binding mutable: `mut b` |
b7449926 | 6 | ... |
532ac7d7 | 7 | LL | b = Box::new(1); |
8faf50e0 | 8 | | - first assignment to `b` |
532ac7d7 | 9 | LL | b = Box::new(2); |
8faf50e0 XL |
10 | | ^ cannot assign twice to immutable variable |
11 | ||
12 | error[E0384]: cannot assign twice to immutable variable `b` | |
48663c56 | 13 | --> $DIR/issue-45199.rs:14:5 |
8faf50e0 | 14 | | |
532ac7d7 | 15 | LL | let b = Box::new(1); |
8faf50e0 XL |
16 | | - |
17 | | | | |
18 | | first assignment to `b` | |
cdc7bbd5 | 19 | | help: consider making this binding mutable: `mut b` |
8faf50e0 | 20 | ... |
532ac7d7 | 21 | LL | b = Box::new(2); |
8faf50e0 XL |
22 | | ^ cannot assign twice to immutable variable |
23 | ||
24 | error[E0384]: cannot assign to immutable argument `b` | |
48663c56 | 25 | --> $DIR/issue-45199.rs:20:5 |
8faf50e0 | 26 | | |
532ac7d7 | 27 | LL | fn test_args(b: Box<i32>) { |
cdc7bbd5 | 28 | | - help: consider making this binding mutable: `mut b` |
48663c56 | 29 | LL | |
532ac7d7 | 30 | LL | b = Box::new(2); |
8faf50e0 XL |
31 | | ^ cannot assign to immutable argument |
32 | ||
33 | error: aborting due to 3 previous errors | |
34 | ||
35 | For more information about this error, try `rustc --explain E0384`. |