diff options
Diffstat (limited to 'tests/ui/issues/issue-15896.rs')
-rw-r--r-- | tests/ui/issues/issue-15896.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-15896.rs b/tests/ui/issues/issue-15896.rs new file mode 100644 index 000000000..d3153b516 --- /dev/null +++ b/tests/ui/issues/issue-15896.rs @@ -0,0 +1,15 @@ +// 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}, + //~^ ERROR mismatched types + _) => x, + }; +} |