diff options
Diffstat (limited to 'src/test/compile-fail/borrowck-vec-pattern-nesting.rs')
| -rw-r--r-- | src/test/compile-fail/borrowck-vec-pattern-nesting.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs index 4a56f982106..58932d1b422 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs @@ -22,7 +22,7 @@ fn b() { let mut vec = vec!(box 1i, box 2, box 3); let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { - [.._b] => { + [_b..] => { vec[0] = box 4; //~ ERROR cannot assign } } @@ -33,7 +33,7 @@ fn c() { let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { [_a, //~ ERROR cannot move out - .._b] => { //~^ NOTE attempting to move value to here + _b..] => { //~^ NOTE attempting to move value to here // Note: `_a` is *moved* here, but `b` is borrowing, // hence illegal. @@ -50,7 +50,7 @@ fn d() { let mut vec = vec!(box 1i, box 2, box 3); let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { - [.._a, //~ ERROR cannot move out + [_a.., //~ ERROR cannot move out _b] => {} //~ NOTE attempting to move value to here _ => {} } |
