1 #![feature(box_patterns)]
2 
3 #![allow(dead_code)]
4 #![deny(unreachable_patterns)]
5 
6 enum Foo { A(Box<Foo>, isize), B(usize), }
7 
main()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 }
15