Files
rust/src/test/ui/pattern/pattern-tyvar-2.rs

7 lines
226 B
Rust
Raw Normal View History

enum Bar { T1((), Option<Vec<isize>>), T2, }
fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3; } _ => { panic!(); } } }
2019-12-11 23:11:32 +01:00
//~^ ERROR cannot multiply `{integer}` to `std::vec::Vec<isize>`
fn main() { }