2021-12-31 15:55:34 -06:00
|
|
|
error: lifetime may not live long enough
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/issue-17758.rs:7:9
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
2021-10-03 15:25:26 -05:00
|
|
|
LL | trait Foo<'a> {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
LL | fn foo(&'a self);
|
2019-01-27 05:03:21 -06:00
|
|
|
LL | fn bar(&self) {
|
2021-12-31 15:55:34 -06:00
|
|
|
| - let's call the lifetime of this reference `'1`
|
2019-01-27 05:03:21 -06:00
|
|
|
LL | self.foo();
|
2021-12-31 15:55:34 -06:00
|
|
|
| ^^^^^^^^^^ argument requires that `'1` must outlive `'a`
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|