]>
Commit | Line | Data |
---|---|---|
c295e0f8 XL |
1 | // aux-build:hidden.rs |
2 | ||
3 | extern crate hidden; | |
4 | ||
5 | use hidden::Foo; | |
6 | ||
7 | fn main() { | |
8 | match Foo::A { | |
9 | Foo::A => {} | |
10 | Foo::B => {} | |
11 | } | |
12 | //~^^^^ non-exhaustive patterns: `_` not covered | |
13 | ||
14 | match Foo::A { | |
15 | Foo::A => {} | |
16 | Foo::C => {} | |
17 | } | |
18 | //~^^^^ non-exhaustive patterns: `B` not covered | |
19 | ||
20 | match Foo::A { | |
21 | Foo::A => {} | |
22 | } | |
23 | //~^^^ non-exhaustive patterns: `B` and `_` not covered | |
24 | ||
25 | match None { | |
26 | None => {} | |
27 | Some(Foo::A) => {} | |
28 | } | |
29 | //~^^^^ non-exhaustive patterns: `Some(B)` and `Some(_)` not covered | |
30 | } |