]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / doc-hidden-non-exhaustive.rs
CommitLineData
c295e0f8
XL
1// aux-build:hidden.rs
2
3extern crate hidden;
4
5use hidden::Foo;
6
7fn 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}