fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0384]: cannot assign twice to immutable variable `b` 2 --> $DIR/issue-45199.rs:6:5 3 | 4LL | let b: Box<isize>; 5 | - help: make this binding mutable: `mut b` 6... 7LL | b = Box::new(1); 8 | - first assignment to `b` 9LL | b = Box::new(2); 10 | ^ cannot assign twice to immutable variable 11 12error[E0384]: cannot assign twice to immutable variable `b` 13 --> $DIR/issue-45199.rs:14:5 14 | 15LL | let b = Box::new(1); 16 | - 17 | | 18 | first assignment to `b` 19 | help: make this binding mutable: `mut b` 20... 21LL | b = Box::new(2); 22 | ^ cannot assign twice to immutable variable 23 24error[E0384]: cannot assign to immutable argument `b` 25 --> $DIR/issue-45199.rs:20:5 26 | 27LL | fn test_args(b: Box<i32>) { 28 | - help: make this binding mutable: `mut b` 29LL | 30LL | b = Box::new(2); 31 | ^ cannot assign to immutable argument 32 33error: aborting due to 3 previous errors 34 35For more information about this error, try `rustc --explain E0384`.