1 2 3 4 5 6 7 8 9 10
#![feature(box_patterns)] fn box_an_int() -> Box<i32> { Box::new(5) } #[test] fn unbox_by_pattern() { let box a = box_an_int(); assert_eq!(a, 5); }