use unsize::{Coercion, CoerceUnsize}; use without_alloc::{boxed::Box, Uninit}; use core::mem::MaybeUninit; #[test] fn unsizing() { let mut memory: MaybeUninit = MaybeUninit::uninit(); let boxed = Box::new(0usize, Uninit::from(&mut memory)); let debug: Box = boxed.unsize(Coercion::to_debug()); assert_eq!(format!("{:?}", &*debug), "0"); }