]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-16683.stderr
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[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(); //~ ERROR cannot infer
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 LL | |         self.a(); //~ ERROR cannot infer
12 LL | |     }
13    | |_____^
14 note: ...so that reference does not outlive borrowed content
15   --> $DIR/issue-16683.rs:4:9
16    |
17 LL |         self.a(); //~ ERROR cannot infer
18    |         ^^^^
19 note: but, the lifetime must be valid for the lifetime 'a as defined on the trait at 1:9...
20   --> $DIR/issue-16683.rs:1:9
21    |
22 LL | trait T<'a> {
23    |         ^^
24    = note: ...so that the types are compatible:
25            expected &'a Self
26               found &Self
27
28 error: aborting due to previous error
29
30 For more information about this error, try `rustc --explain E0495`.