// run-pass #![feature(ptr_metadata)] use std::alloc::Layout; use std::ptr::Pointee; trait Foo { type Bar; } impl Foo for () { type Bar = (); } struct Wrapper1(#[allow(unused_tuple_struct_fields)] ::Bar); struct Wrapper2(#[allow(unused_tuple_struct_fields)] as Pointee>::Metadata); fn main() { let _: Wrapper2<()> = Wrapper2(()); let _ = Layout::new::>(); }