rust/tests/ui/pattern/pattern-tyvar.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
226 B
Rust
Raw Normal View History

enum Bar { T1((), Option<Vec<isize>>), T2 }
fn foo(t: Bar) {
2012-08-06 19:34:08 +00:00
match t {
Bar::T1(_, Some::<isize>(x)) => { //~ ERROR mismatched types
2014-10-15 01:07:11 +00:00
println!("{}", x);
}
_ => { panic!(); }
}
}
fn main() { }