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