Amend compile-fail tests
This commit is contained in:
parent
5ba61edbd0
commit
a1570828b2
@ -10,13 +10,14 @@
|
||||
|
||||
#![feature(slice_patterns)]
|
||||
#![deny(unreachable_patterns)]
|
||||
#![allow(unused_variables)]
|
||||
|
||||
fn main() {
|
||||
let x: Vec<(isize, isize)> = Vec::new();
|
||||
let x: &[(isize, isize)] = &x;
|
||||
match *x {
|
||||
[_, (2, 3), _] => (),
|
||||
[(1, 2), (2, 3), _] => (), //~ ERROR unreachable pattern
|
||||
[a, (2, 3), _] => (),
|
||||
[(1, 2), (2, 3), b] => (), //~ ERROR unreachable pattern
|
||||
_ => ()
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern:unreachable pattern
|
||||
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![allow(dead_code)]
|
||||
@ -20,7 +18,7 @@ enum Foo { A(Box<Foo>, isize), B(usize), }
|
||||
fn main() {
|
||||
match Foo::B(1) {
|
||||
Foo::B(_) | Foo::A(box _, 1) => { }
|
||||
Foo::A(_, 1) => { }
|
||||
Foo::A(_, 1) => { } //~ ERROR unreachable pattern
|
||||
_ => { }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user