1 error[E0384]: cannot assign twice to immutable variable `b`
2 --> $DIR/issue-45199.rs:20:5
4 LL | let b: Box<isize>;
5 | - help: make this binding mutable: `mut b`
7 LL | b = Box::new(1); //[ast]~ NOTE first assignment
8 | - first assignment to `b`
9 LL | //[mir]~^ NOTE first assignment
10 LL | b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable
11 | ^ cannot assign twice to immutable variable
13 error[E0384]: cannot assign twice to immutable variable `b`
14 --> $DIR/issue-45199.rs:31:5
16 LL | let b = Box::new(1); //[ast]~ NOTE first assignment
19 | first assignment to `b`
20 | help: make this binding mutable: `mut b`
22 LL | b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable
23 | ^ cannot assign twice to immutable variable
25 error[E0384]: cannot assign to immutable argument `b`
26 --> $DIR/issue-45199.rs:40:5
28 LL | fn test_args(b: Box<i32>) { //[ast]~ NOTE first assignment
29 | - help: make this binding mutable: `mut b`
31 LL | b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable
32 | ^ cannot assign to immutable argument
34 error: aborting due to 3 previous errors
36 For more information about this error, try `rustc --explain E0384`.