]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs
Auto merge of #103659 - clubby789:improve-partialord-derive, r=nagisa
[rust.git] / tests / ui / rfcs / rfc-2005-default-binding-mode / box.rs
1 // run-pass
2 #![allow(unreachable_patterns)]
3 #![feature(box_patterns)]
4
5 struct Foo{}
6
7 pub fn main() {
8     let b = Box::new(Foo{});
9     let box f = &b;
10     let _: &Foo = f;
11
12     match &&&b {
13         box f => {
14             let _: &Foo = f;
15         },
16         _ => panic!(),
17     }
18 }