]> git.lizzy.rs Git - rust.git/blob - src/test/ui/reachable/unreachable-arm.rs
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[rust.git] / src / test / ui / reachable / unreachable-arm.rs
1 #![feature(box_patterns)]
2
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 }