2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
2018-08-31 08:02:01 -05:00
|
|
|
#![allow(non_shorthand_field_patterns)]
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct T { a: Box<isize> }
|
2013-08-12 22:18:47 -05:00
|
|
|
|
|
|
|
trait U {
|
|
|
|
fn f(self);
|
|
|
|
}
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
impl U for Box<isize> {
|
2013-08-12 22:18:47 -05:00
|
|
|
fn f(self) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
2022-07-06 21:36:10 -05:00
|
|
|
let T { a: a } = T { a: Box::new(0) };
|
2013-08-12 22:18:47 -05:00
|
|
|
a.f();
|
|
|
|
}
|