summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/pattern-tyvar.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/pattern-tyvar.rs')
-rw-r--r--tests/ui/pattern/pattern-tyvar.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/pattern/pattern-tyvar.rs b/tests/ui/pattern/pattern-tyvar.rs
new file mode 100644
index 000000000..e2cbf0519
--- /dev/null
+++ b/tests/ui/pattern/pattern-tyvar.rs
@@ -0,0 +1,12 @@
+enum Bar { T1((), Option<Vec<isize>>), T2 }
+
+fn foo(t: Bar) {
+ match t {
+ Bar::T1(_, Some::<isize>(x)) => { //~ ERROR mismatched types
+ println!("{}", x);
+ }
+ _ => { panic!(); }
+ }
+}
+
+fn main() { }