3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
6 #![feature(box_patterns)]
7 #![feature(box_syntax)]
10 StructVar { boxed: Box<i32> }
15 // Test matching each shorthand notation for field patterns.
16 let mut a = E::StructVar { boxed: box 3 };
18 E::StructVar { box boxed } => { }
21 E::StructVar { box ref boxed } => { }
24 E::StructVar { box mut boxed } => { }
27 E::StructVar { box ref mut boxed } => { }
30 E::StructVar { ref boxed } => { }
33 E::StructVar { ref mut boxed } => { }
36 E::StructVar { mut boxed } => { }
39 // Test matching non shorthand notation. Recreate a since last test
41 let mut a = E::StructVar { boxed: box 3 };
43 E::StructVar { boxed: box ref mut num } => { }
46 E::StructVar { boxed: ref mut num } => { }