3 #![allow(non_camel_case_types)]
4 #![allow(non_shorthand_field_patterns)]
6 #![feature(box_patterns)]
8 struct Foo {a: isize, b: usize}
10 enum bar { u(Box<Foo>), w(isize), }
13 let v = match bar::u(Box::new(Foo{ a: 10, b: 40 })) {
14 bar::u(box Foo{ a: a, b: b }) => { a + (b as isize) }