]>
git.proxmox.com Git - rustc.git/blob - tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs
1 // aux-build:non-exhaustive.rs
3 extern crate non_exhaustive
;
5 use non_exhaustive
::NonExhaustiveEnum
;
8 match Some(NonExhaustiveEnum
::A
) {
9 //~^ ERROR non-exhaustive patterns: `Some(_)` not covered [E0004]
10 //~| NOTE pattern `Some(_)` not covered
11 //~| NOTE `Option<NonExhaustiveEnum>` defined here
12 //~| NOTE the matched value is of type `Option<NonExhaustiveEnum>`
13 //~| NOTE `NonExhaustiveEnum` is marked as non-exhaustive
14 Some(NonExhaustiveEnum
::A
) => {}
15 Some(NonExhaustiveEnum
::B
) => {}