diff options
Diffstat (limited to 'src/test/ui/pattern/pattern-tyvar.rs')
-rw-r--r-- | src/test/ui/pattern/pattern-tyvar.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/pattern/pattern-tyvar.rs b/src/test/ui/pattern/pattern-tyvar.rs new file mode 100644 index 000000000..e2cbf0519 --- /dev/null +++ b/src/test/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() { } |