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