use std::any::Any; fn foo(value: &T) -> Box { Box::new(value) as Box //~^ ERROR lifetime may not live long enough } fn main() { let _ = foo(&5); }