mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
23 lines
509 B
Rust
23 lines
509 B
Rust
#![feature(unstable_test_feature)]
|
|
|
|
//@ aux-build:unstable.rs
|
|
|
|
extern crate unstable;
|
|
|
|
use unstable::UnstableEnum;
|
|
|
|
fn main() {
|
|
match UnstableEnum::Stable {
|
|
UnstableEnum::Stable => {}
|
|
UnstableEnum::Stable2 => {}
|
|
}
|
|
//~^^^^ non-exhaustive patterns: `UnstableEnum::Unstable` not covered
|
|
|
|
// Ok: all variants are explicitly matched
|
|
match UnstableEnum::Stable {
|
|
UnstableEnum::Stable => {}
|
|
UnstableEnum::Stable2 => {}
|
|
UnstableEnum::Unstable => {}
|
|
}
|
|
}
|