Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
22
tests/ui/pattern/usefulness/unstable-gated-patterns.rs
Normal file
22
tests/ui/pattern/usefulness/unstable-gated-patterns.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
#![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 => {}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue