thereof.)
PR 14739 injected the new message that this removes from one test
case: borrowck-vec-pattern-loan-from-mut.rs
When reviewing the test case, I was not able to convince myself that
the error message was a legitimate thing to start emitting. Niko did
not see an obvious reason for it either, so I am going to remove it
and wait for someone (maybe Cameron Zwarich) to explain to me why we
should be emitting it.
let mut v = vec!(1, 2, 3);
let vb: &mut [int] = v.as_mut_slice();
match vb {
- [_a, ..tail] => { //~ ERROR cannot use `vb[..]` because it was mutably borrowed
+ [_a, ..tail] => {
v.push(tail[0] + tail[1]); //~ ERROR cannot borrow
}
_ => {}