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