use std::any::Any; fn foo(value: &T) -> Box { Box::new(value) as Box //~ ERROR E0759 } fn main() { let _ = foo(&5); }