3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
6 #![feature(box_patterns)]
9 StructVar { boxed: Box<i32> }
14 // Test matching each shorthand notation for field patterns.
15 let mut a = E::StructVar { boxed: Box::new(3) };
17 E::StructVar { box boxed } => { }
20 E::StructVar { box ref boxed } => { }
23 E::StructVar { box mut boxed } => { }
26 E::StructVar { box ref mut boxed } => { }
29 E::StructVar { ref boxed } => { }
32 E::StructVar { ref mut boxed } => { }
35 E::StructVar { mut boxed } => { }
38 // Test matching non shorthand notation. Recreate a since last test
40 let mut a = E::StructVar { boxed: Box::new(3) };
42 E::StructVar { boxed: box ref mut num } => { }
45 E::StructVar { boxed: ref mut num } => { }