summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/stable-gated-patterns.rs
blob: 03db01160ddabe95e6936be4abd65cd3c079358e (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: `UnstableEnum::Stable2` and `_` not covered

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