27 lines
976 B
Plaintext
27 lines
976 B
Plaintext
|
error[E0310]: the parameter type `T` may not live long enough
|
||
|
--> $DIR/candidate-from-env-universe-err-1.rs:23:5
|
||
|
|
|
||
|
LL | hr_bound::<&T>();
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
| |
|
||
|
| the parameter type `T` must be valid for the static lifetime...
|
||
|
| ...so that the type `T` will meet its required lifetime bounds
|
||
|
|
|
||
|
help: consider adding an explicit lifetime bound
|
||
|
|
|
||
|
LL | T: Trait + 'static,
|
||
|
| +++++++++
|
||
|
|
||
|
error: implementation of `Trait` is not general enough
|
||
|
--> $DIR/candidate-from-env-universe-err-1.rs:23:5
|
||
|
|
|
||
|
LL | hr_bound::<&T>();
|
||
|
| ^^^^^^^^^^^^^^ implementation of `Trait` is not general enough
|
||
|
|
|
||
|
= note: `Trait` would have to be implemented for the type `&'0 &T`, for any lifetime `'0`...
|
||
|
= note: ...but `Trait` is actually implemented for the type `&'1 &'1 T`, for some specific lifetime `'1`
|
||
|
|
||
|
error: aborting due to 2 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0310`.
|