trait Thin = Pointee<Metadata = ()>;
ptr_metadata #81513)
Pointers to types implementing this trait alias are “thin”.
This includes statically-Sized types and extern types.
#![feature(ptr_metadata)]
fn this_never_panics<T: std::ptr::Thin>() {
assert_eq!(size_of::<&T>(), size_of::<usize>())
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ptr/traitalias.Thin.html