// revisions: base nll // ignore-compare-mode-nll //[nll] compile-flags: -Z borrowck=mir use std::any::Any; fn foo(value: &T) -> Box { Box::new(value) as Box //[base]~^ ERROR E0759 //[nll]~^^ ERROR lifetime may not live long enough } fn main() { let _ = foo(&5); }