1 fn test_drop_replace() {
3 //~^ HELP consider making this binding mutable
5 b = Box::new(1); //~ NOTE first assignment
6 b = Box::new(2); //~ ERROR cannot assign twice to immutable variable `b`
7 //~| NOTE cannot assign twice to immutable
11 let b = Box::new(1); //~ NOTE first assignment
12 //~| HELP consider making this binding mutable
14 b = Box::new(2); //~ ERROR cannot assign twice to immutable variable `b`
15 //~| NOTE cannot assign twice to immutable
18 fn test_args(b: Box<i32>) { //~ HELP consider making this binding mutable
20 b = Box::new(2); //~ ERROR cannot assign to immutable argument `b`
21 //~| NOTE cannot assign to immutable argument