rust/tests/run-pass/negative_discriminant.rs

14 lines
186 B
Rust
Raw Normal View History

enum AB { A = -1, B = 1 }
fn main() {
match AB::A {
AB::A => (),
AB::B => panic!(),
}
match AB::B {
AB::A => panic!(),
AB::B => (),
}
}