]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-17758.stderr
New upstream version 1.41.1+dfsg1
[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 |
0731742a
XL
7note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 6:5...
8 --> $DIR/issue-17758.rs:6:5
8faf50e0
XL
9 |
10LL | / fn bar(&self) {
11LL | | self.foo();
532ac7d7 12LL | |
8faf50e0
XL
13LL | | }
14 | |_____^
15note: ...so that reference does not outlive borrowed content
0731742a 16 --> $DIR/issue-17758.rs:7:9
8faf50e0
XL
17 |
18LL | self.foo();
19 | ^^^^
e74abb32 20note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 4:11...
0731742a 21 --> $DIR/issue-17758.rs:4:11
8faf50e0
XL
22 |
23LL | trait Foo<'a> {
24 | ^^
60c5eb7d
XL
25note: ...so that the types are compatible
26 --> $DIR/issue-17758.rs:7:14
27 |
28LL | self.foo();
29 | ^^^
30 = note: expected `&'a Self`
31 found `&Self`
8faf50e0
XL
32
33error: aborting due to previous error
34
e74abb32 35For more information about this error, try `rustc --explain E0495`.