]> git.lizzy.rs Git - rust.git/blob - src/test/ui/reachable/unreachable-arm.rs
Organize `never_type` tests
[rust.git] / src / test / ui / reachable / unreachable-arm.rs
1 #![feature(box_patterns)]
2 #![feature(box_syntax)]
3 #![allow(dead_code)]
4 #![deny(unreachable_patterns)]
5
6 enum Foo { A(Box<Foo>, isize), B(usize), }
7
8 fn main() {
9     match Foo::B(1) {
10         Foo::B(_) | Foo::A(box _, 1) => { }
11         Foo::A(_, 1) => { } //~ ERROR unreachable pattern
12         _ => { }
13     }
14 }