2018-07-15 16:11:54 -05:00
|
|
|
error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-16683.rs:4:14
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | self.a();
|
2018-07-15 16:11:54 -05:00
|
|
|
| ^
|
|
|
|
|
|
2021-10-05 07:11:51 -05:00
|
|
|
note: first, the lifetime cannot outlive the anonymous lifetime defined here...
|
2021-02-22 08:39:06 -06:00
|
|
|
--> $DIR/issue-16683.rs:3:10
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2020-08-12 16:02:14 -05:00
|
|
|
LL | fn b(&self) {
|
2021-02-22 08:39:06 -06:00
|
|
|
| ^^^^^
|
2018-07-15 16:11:54 -05:00
|
|
|
note: ...so that reference does not outlive borrowed content
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-16683.rs:4:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | self.a();
|
2018-07-15 16:11:54 -05:00
|
|
|
| ^^^^
|
2021-10-05 07:11:51 -05:00
|
|
|
note: but, the lifetime must be valid for the lifetime `'a` as defined here...
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-16683.rs:1:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | trait T<'a> {
|
|
|
|
| ^^
|
2019-12-03 21:20:05 -06:00
|
|
|
note: ...so that the types are compatible
|
|
|
|
--> $DIR/issue-16683.rs:4:14
|
|
|
|
|
|
|
|
|
LL | self.a();
|
|
|
|
| ^
|
2019-12-19 21:44:06 -06:00
|
|
|
= note: expected `&'a Self`
|
2019-12-22 15:53:01 -06:00
|
|
|
found `&Self`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2019-09-12 08:00:44 -05:00
|
|
|
For more information about this error, try `rustc --explain E0495`.
|