2019-01-27 05:03:21 -06:00
|
|
|
error[E0309]: the parameter type `Self` may not live long enough
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/regions-infer-bound-from-trait-self.rs:46:9
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
2023-09-17 09:32:02 -05:00
|
|
|
LL | trait InheritsFromNothing<'a> : Sized {
|
|
|
|
| -- the parameter type `Self` must be valid for the lifetime `'a` as defined here...
|
|
|
|
LL | fn foo(self, x: Inv<'a>) {
|
2019-01-27 05:03:21 -06:00
|
|
|
LL | check_bound(x, self)
|
2023-09-07 20:35:51 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `Self` will meet its required lifetime bounds
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
2023-10-08 05:06:17 -05:00
|
|
|
help: consider adding an explicit lifetime bound
|
2023-09-07 20:35:51 -05:00
|
|
|
|
|
|
|
|
LL | trait InheritsFromNothing<'a> : Sized where Self: 'a {
|
|
|
|
| ++++++++++++++
|
2019-01-27 05:03:21 -06:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0309`.
|