let mut vec = [box 1, box 2, box 3];
match vec {
[box ref _a, _, _] => {
+ //~^ borrow of `vec[..]` occurs here
vec[0] = box 4; //~ ERROR cannot assign
}
}
let vec: &mut [Box<isize>] = &mut vec;
match vec {
[_b..] => {
+ //~^ borrow of `vec[..]` occurs here
vec[0] = box 4; //~ ERROR cannot assign
}
}
_ => {}
}
let a = vec[0]; //~ ERROR cannot move out
+ //~^ NOTE attempting to move value to here
}
fn d() {
_ => {}
}
let a = vec[0]; //~ ERROR cannot move out
+ //~^ NOTE attempting to move value to here
}
fn e() {