2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(unreachable_patterns)]
|
2021-08-24 19:39:40 -05:00
|
|
|
#![feature(box_patterns)]
|
2017-10-06 15:30:23 -05:00
|
|
|
|
|
|
|
struct Foo{}
|
|
|
|
|
|
|
|
pub fn main() {
|
2021-08-24 19:39:40 -05:00
|
|
|
let b = Box::new(Foo{});
|
2017-10-06 15:30:23 -05:00
|
|
|
let box f = &b;
|
|
|
|
let _: &Foo = f;
|
|
|
|
|
|
|
|
match &&&b {
|
|
|
|
box f => {
|
|
|
|
let _: &Foo = f;
|
|
|
|
},
|
|
|
|
_ => panic!(),
|
|
|
|
}
|
|
|
|
}
|