#![allow(unused_variables)] #![feature(thin_box)] fn main() { use std::boxed::ThinBox; let five = ThinBox::new(5); let thin_slice = ThinBox::<[i32]>::new_unsize([1, 2, 3, 4]); let size_of_ptr = size_of::<*const ()>(); assert_eq!(size_of_ptr, size_of_val(& five)); assert_eq!(size_of_ptr, size_of_val(& thin_slice)); }