about summary refs log tree commit diff
path: root/tests/ui/pattern/usefulness/stable-gated-patterns.rs
blob: d58483441549b04ae7bc07458e25b42d732762df (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 => {}
    }
    //~^^^ ERROR non-exhaustive patterns: `UnstableEnum::Stable2` and `_` not covered

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