2018-08-08 07:28:26 -05:00
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2021-08-06 10:46:20 -05:00
|
|
|
--> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:16
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Out = &'a fn(T);
|
2021-08-06 10:46:20 -05:00
|
|
|
| ^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
|
2022-03-14 09:56:37 -05:00
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | impl<'a, T: 'a> Trait<'a, T> for usize {
|
|
|
|
| ++++
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2021-08-06 10:46:20 -05:00
|
|
|
--> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:16
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | type Out = &'a dyn Baz<T>;
|
2021-08-06 10:46:20 -05:00
|
|
|
| ^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
|
2022-03-14 09:56:37 -05:00
|
|
|
|
|
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
|
|
|
LL | impl<'a, T: 'a> Trait<'a, T> for u32 {
|
|
|
|
| ++++
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0309`.
|