Skip to content

Commit 4c2a8bb

Browse files
committed
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.
1 parent 3ddb987 commit 4c2a8bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/compile-fail/borrowck-vec-pattern-loan-from-mut.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn a() {
1212
let mut v = vec!(1, 2, 3);
1313
let vb: &mut [int] = v.as_mut_slice();
1414
match vb {
15-
[_a, ..tail] => { //~ ERROR cannot use `vb[..]` because it was mutably borrowed
15+
[_a, ..tail] => {
1616
v.push(tail[0] + tail[1]); //~ ERROR cannot borrow
1717
}
1818
_ => {}

0 commit comments

Comments
 (0)