summaryrefslogtreecommitdiffstats
path: root/src/test/ui/reachable/unreachable-arm.rs
blob: 3277bf0d52b201babb349bb9e39c6548ae8478e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(box_patterns)]

#![allow(dead_code)]
#![deny(unreachable_patterns)]

enum Foo { A(Box<Foo>, isize), B(usize), }

fn main() {
    match Foo::B(1) {
        Foo::B(_) | Foo::A(box _, 1) => { }
        Foo::A(_, 1) => { } //~ ERROR unreachable pattern
        _ => { }
    }
}