Adapt test case to match current set of emitted warnings. (or lack
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.
This commit is contained in:
parent
3ddb987f45
commit
4c2a8bbc09
@ -12,7 +12,7 @@ fn a() {
|
||||
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
|
||||
}
|
||||
_ => {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user