rust/tests/ui/binding/match-enum-struct-0.rs

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

18 lines
220 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
// regression test for issue #5625
enum E {
Foo{f : isize},
Bar
}
pub fn main() {
let e = E::Bar;
match e {
E::Foo{f: _f} => panic!(),
_ => (),
}
}