fix warnings in vec destructuring tests

This commit is contained in:
Erick Tryzelaar 2012-12-17 18:11:32 -08:00
parent 23564574ac
commit 3fc74df7a4
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
fn a() -> &int {
let vec = [1, 2, 3, 4];
let tail = match vec {
[a, ..tail] => &tail[0], //~ ERROR illegal borrow
[_a, ..tail] => &tail[0], //~ ERROR illegal borrow
_ => fail ~"foo"
};
move tail

View file

@ -1,7 +1,7 @@
fn a() -> &[int] {
let vec = [1, 2, 3, 4];
let tail = match vec {
[a, ..tail] => tail, //~ ERROR illegal borrow
[_a, ..tail] => tail, //~ ERROR illegal borrow
_ => fail ~"foo"
};
move tail