summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-15896.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-15896.rs')
-rw-r--r--src/test/ui/issues/issue-15896.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-15896.rs b/src/test/ui/issues/issue-15896.rs
new file mode 100644
index 000000000..d3153b516
--- /dev/null
+++ b/src/test/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,
+ };
+}