summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/pattern-tyvar-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/pattern-tyvar-2.rs')
-rw-r--r--tests/ui/pattern/pattern-tyvar-2.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/pattern/pattern-tyvar-2.rs b/tests/ui/pattern/pattern-tyvar-2.rs
new file mode 100644
index 000000000..7647c766e
--- /dev/null
+++ b/tests/ui/pattern/pattern-tyvar-2.rs
@@ -0,0 +1,6 @@
+enum Bar { T1((), Option<Vec<isize>>), T2, }
+
+fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3; } _ => { panic!(); } } }
+//~^ ERROR cannot multiply `Vec<isize>` by `{integer}`
+
+fn main() { }