]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements |
2 | --> $DIR/constant-in-expr-inherent-1.rs:8:5 | |
3 | | | |
4 | LL | <Foo<'a>>::C | |
5 | | ^^^^^^^^^^^^ | |
6 | | | |
e74abb32 | 7 | note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 7:8... |
48663c56 | 8 | --> $DIR/constant-in-expr-inherent-1.rs:7:8 |
0bf4aa26 XL |
9 | | |
10 | LL | fn foo<'a>(_: &'a u32) -> &'static u32 { | |
48663c56 | 11 | | ^^ |
60c5eb7d XL |
12 | note: ...so that the types are compatible |
13 | --> $DIR/constant-in-expr-inherent-1.rs:8:5 | |
14 | | | |
15 | LL | <Foo<'a>>::C | |
16 | | ^^^^^^^^^^^^ | |
f9f354fc XL |
17 | = note: expected `Foo<'_>` |
18 | found `Foo<'a>` | |
48663c56 XL |
19 | = note: but, the lifetime must be valid for the static lifetime... |
20 | note: ...so that reference does not outlive borrowed content | |
21 | --> $DIR/constant-in-expr-inherent-1.rs:8:5 | |
22 | | | |
532ac7d7 | 23 | LL | <Foo<'a>>::C |
48663c56 | 24 | | ^^^^^^^^^^^^ |
0bf4aa26 XL |
25 | |
26 | error: aborting due to previous error | |
27 | ||
e74abb32 | 28 | For more information about this error, try `rustc --explain E0495`. |