summary refs log tree commit diff
path: root/src/test/ui/pattern/usefulness/stable-gated-patterns.rs
blob: 2e023a3be4a5ea5f25529a3947d43e0bb611e752 (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::Foo;

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

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