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
|
|
|
| ^
|
|
|
|
|
|
2018-12-25 09:56:47 -06:00
|
|
|
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 3:5...
|
|
|
|
--> $DIR/issue-16683.rs:3:5
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | / fn b(&self) {
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | | self.a();
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
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
|
|
|
| ^^^^
|
2019-10-10 18:58:35 -05:00
|
|
|
note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 1:9...
|
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();
|
|
|
|
| ^
|
|
|
|
= note: expected `&'a Self`
|
|
|
|
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`.
|