rust/src/test/ui/pattern/pattern-tyvar-2.rs
2018-12-25 21:08:33 -07:00

6 lines
214 B
Rust

enum Bar { T1((), Option<Vec<isize>>), T2, }
fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3; } _ => { panic!(); } } }
//~^ ERROR binary operation `*` cannot be applied to
fn main() { }