]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-17758.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / issues / issue-17758.stderr
CommitLineData
8faf50e0 1error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
0731742a 2 --> $DIR/issue-17758.rs:7:14
8faf50e0
XL
3 |
4LL | self.foo();
5 | ^^^
6 |
6a06907d
XL
7note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 6:12...
8 --> $DIR/issue-17758.rs:6:12
8faf50e0 9 |
3dfed10e 10LL | fn bar(&self) {
6a06907d 11 | ^^^^^
8faf50e0 12note: ...so that reference does not outlive borrowed content
0731742a 13 --> $DIR/issue-17758.rs:7:9
8faf50e0
XL
14 |
15LL | self.foo();
16 | ^^^^
e74abb32 17note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 4:11...
0731742a 18 --> $DIR/issue-17758.rs:4:11
8faf50e0
XL
19 |
20LL | trait Foo<'a> {
21 | ^^
60c5eb7d
XL
22note: ...so that the types are compatible
23 --> $DIR/issue-17758.rs:7:14
24 |
25LL | self.foo();
26 | ^^^
f9f354fc
XL
27 = note: expected `&'a Self`
28 found `&Self`
8faf50e0
XL
29
30error: aborting due to previous error
31
e74abb32 32For more information about this error, try `rustc --explain E0495`.