error[E0310]: the parameter type `A` may not live long enough --> $DIR/regions-close-over-type-parameter-1.rs:20:5 | LL | fn make_object1(v: A) -> Box { | -- help: consider adding an explicit lifetime bound `A: 'static`... LL | box v as Box | ^^^^^ | note: ...so that the type `A` will meet its required lifetime bounds --> $DIR/regions-close-over-type-parameter-1.rs:20:5 | LL | box v as Box | ^^^^^ error[E0310]: the parameter type `A` may not live long enough --> $DIR/regions-close-over-type-parameter-1.rs:20:5 | LL | fn make_object1(v: A) -> Box { | -- help: consider adding an explicit lifetime bound `A: 'static`... LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that it can be closed over into an object --> $DIR/regions-close-over-type-parameter-1.rs:20:5 | LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `A` may not live long enough --> $DIR/regions-close-over-type-parameter-1.rs:30:5 | LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box { | -- help: consider adding an explicit lifetime bound `A: 'b`... LL | box v as Box | ^^^^^ | note: ...so that the type `A` will meet its required lifetime bounds --> $DIR/regions-close-over-type-parameter-1.rs:30:5 | LL | box v as Box | ^^^^^ error[E0309]: the parameter type `A` may not live long enough --> $DIR/regions-close-over-type-parameter-1.rs:30:5 | LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box { | -- help: consider adding an explicit lifetime bound `A: 'b`... LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that it can be closed over into an object --> $DIR/regions-close-over-type-parameter-1.rs:30:5 | LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors Some errors occurred: E0309, E0310. For more information about an error, try `rustc --explain E0309`.