2 // If a struct is packed and its last field has drop glue, then that
3 // field needs to be Sized (to allow it to be destroyed out-of-place).
5 // This is checked by the compiler during wfcheck. That check used
6 // to have problems with associated types in the last field - test
7 // that this doesn't ICE.
9 #![allow(unused_imports, dead_code)]
13 pub trait Trait<R> { type Assoc; }
15 impl<X> Trait<X> for S { type Assoc = X; }
18 struct PackedAssocSized {
19 pos: Box<<S as Trait<usize>>::Assoc>,
22 fn main() { println!("Hello, world!"); }