2018-08-08 07:28:26 -05:00
|
|
|
error[E0310]: the parameter type `T` may not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:6:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn p1<T>(v: T) -> Box<X+'static>
|
|
|
|
| - help: consider adding an explicit lifetime bound `T: 'static`...
|
|
|
|
...
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: ...so that the type `T` will meet its required lifetime bounds
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:6:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0310]: the parameter type `T` may not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:12:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn p2<T>(v: Box<T>) -> Box<X+'static>
|
|
|
|
| - help: consider adding an explicit lifetime bound `T: 'static`...
|
|
|
|
...
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: ...so that the type `std::boxed::Box<T>` will meet its required lifetime bounds
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:12:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:18:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn p3<'a,T>(v: T) -> Box<X+'a>
|
|
|
|
| - help: consider adding an explicit lifetime bound `T: 'a`...
|
|
|
|
...
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: ...so that the type `T` will meet its required lifetime bounds
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:18:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:24:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn p4<'a,T>(v: Box<T>) -> Box<X+'a>
|
|
|
|
| - help: consider adding an explicit lifetime bound `T: 'a`...
|
|
|
|
...
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: ...so that the type `std::boxed::Box<T>` will meet its required lifetime bounds
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-close-param-into-object.rs:24:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0309, E0310.
|
|
|
|
For more information about an error, try `rustc --explain E0309`.
|