blob: b8b0d9d33e7916bbdbe486ee93ed0d2a98478b72 [file] [log] [blame]
#[repr(C)]
union PtrRepr<T: ?Sized> {
const_ptr: *const T,
mut_ptr: *mut T,
components: PtrComponents<T>,
//~^ ERROR the trait bound
//~| ERROR field must implement `Copy`
}
#[repr(C)]
struct PtrComponents<T: Pointee + ?Sized> {
data_address: *const (),
metadata: <T as Pointee>::Metadata,
}
pub trait Pointee {
type Metadata;
}
fn main() {}