error[E0759]: `v` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement --> $DIR/regions-close-object-into-object-4.rs:13:16 | LL | fn i<'a, T, U>(v: Box+'a>) -> Box { | ---------------- this data with lifetime `'a`... LL | Box::new(B(&*v)) as Box | ^^^ ...is used and required to live as long as `'static` here | note: `'static` lifetime requirement introduced by the return type --> $DIR/regions-close-object-into-object-4.rs:12:52 | LL | fn i<'a, T, U>(v: Box+'a>) -> Box { | ^^^^^^^ `'static` requirement introduced here LL | Box::new(B(&*v)) as Box | ------------------------------ because of this returned expression help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v` | LL | fn i<'a, T, U>(v: Box+'a>) -> Box { | ~~ help: alternatively, add an explicit `'static` bound to this reference | LL | fn i<'a, T, U>(v: Box<(dyn A + 'static)>) -> Box { | ~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error For more information about this error, try `rustc --explain E0759`.