]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements |
2 | --> $DIR/issue-55394.rs:9:9 | |
a1dfa0c6 | 3 | | |
532ac7d7 | 4 | LL | Foo { bar } |
48663c56 XL |
5 | | ^^^ |
6 | | | |
7 | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5... | |
8 | --> $DIR/issue-55394.rs:8:5 | |
9 | | | |
10 | LL | / fn new(bar: &mut Bar) -> Self { | |
11 | LL | | Foo { bar } | |
12 | LL | | } | |
13 | | |_____^ | |
14 | note: ...so that reference does not outlive borrowed content | |
15 | --> $DIR/issue-55394.rs:9:15 | |
16 | | | |
17 | LL | Foo { bar } | |
18 | | ^^^ | |
e74abb32 | 19 | note: but, the lifetime must be valid for the lifetime `'_` as defined on the impl at 7:10... |
48663c56 XL |
20 | --> $DIR/issue-55394.rs:7:10 |
21 | | | |
22 | LL | impl Foo<'_> { | |
23 | | ^^ | |
60c5eb7d XL |
24 | note: ...so that the expression is assignable |
25 | --> $DIR/issue-55394.rs:9:9 | |
26 | | | |
27 | LL | Foo { bar } | |
28 | | ^^^^^^^^^^^ | |
29 | = note: expected `Foo<'_>` | |
30 | found `Foo<'_>` | |
a1dfa0c6 XL |
31 | |
32 | error: aborting due to previous error | |
33 | ||
e74abb32 | 34 | For more information about this error, try `rustc --explain E0495`. |