]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-16683.stderr
Rollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=Cldfire
[rust.git] / src / test / ui / issues / issue-16683.stderr
1 error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
2   --> $DIR/issue-16683.rs:4:14
3    |
4 LL |         self.a();
5    |              ^
6    |
7 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 3:5...
8   --> $DIR/issue-16683.rs:3:5
9    |
10 LL |     fn b(&self) {
11    |     ^^^^^^^^^^^
12 note: ...so that reference does not outlive borrowed content
13   --> $DIR/issue-16683.rs:4:9
14    |
15 LL |         self.a();
16    |         ^^^^
17 note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 1:9...
18   --> $DIR/issue-16683.rs:1:9
19    |
20 LL | trait T<'a> {
21    |         ^^
22 note: ...so that the types are compatible
23   --> $DIR/issue-16683.rs:4:14
24    |
25 LL |         self.a();
26    |              ^
27    = note: expected `&'a Self`
28               found `&Self`
29
30 error: aborting due to previous error
31
32 For more information about this error, try `rustc --explain E0495`.