3 The tracking issue for this feature is: [#29641]
5 [#29641]: https://github.com/rust-lang/rust/issues/29641
7 See also [`box_syntax`](box-syntax.md)
9 ------------------------
11 Box patterns let you match on `Box<T>`s:
15 #![feature(box_patterns)]
18 let b = Some(Box::new(5));
20 Some(box n) if n < 0 => {
21 println!("Box contains negative number {}", n);
23 Some(box n) if n >= 0 => {
24 println!("Box contains non-negative number {}", n);