rust/tests/ui/pattern/issue-8351-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
261 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
2013-10-07 06:35:03 +00:00
enum E {
Foo{f: isize, b: bool},
2013-10-07 06:35:03 +00:00
Bar,
}
pub fn main() {
let e = E::Foo{f: 0, b: false};
2013-10-07 06:35:03 +00:00
match e {
E::Foo{f: 1, b: true} => panic!(),
E::Foo{b: false, f: 0} => (),
_ => panic!(),
2013-10-07 06:35:03 +00:00
}
}