rust/tests/ui/issues/issue-15896.rs

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

16 lines
310 B
Rust
Raw Normal View History

// Regression test for #15896. It used to ICE rustc.
fn main() {
enum R { REB(()) }
struct Tau { t: usize }
enum E { B(R, Tau) }
let e = E::B(R::REB(()), Tau { t: 3 });
let u = match e {
E::B(
Tau{t: x},
2015-01-12 00:01:44 -06:00
//~^ ERROR mismatched types
_) => x,
};
}