summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/usefulness/stable-gated-patterns.rs
blob: ff1c472e24fd6292a06845e9c7bae9c3f4ecc388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// aux-build:unstable.rs

extern crate unstable;

use unstable::UnstableEnum;

fn main() {
    match UnstableEnum::Stable {
        UnstableEnum::Stable => {}
    }
    //~^^^ non-exhaustive patterns: `Stable2` and `_` not covered

    match UnstableEnum::Stable {
        UnstableEnum::Stable => {}
        UnstableEnum::Stable2 => {}
    }
    //~^^^^ non-exhaustive patterns: `_` not covered
}