error[E0621]: explicit lifetime required in the type of `value` --> $DIR/issue-16922.rs:14:5 | LL | fn foo(value: &T) -> Box { | -- help: add explicit lifetime `'static` to the type of `value`: `&'static T` LL | Box::new(value) as Box | ^^^^^^^^^^^^^^^ lifetime `'static` required error: aborting due to previous error For more information about this error, try `rustc --explain E0621`.