]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements |
0731742a | 2 | --> $DIR/regions-creating-enums4.rs:7:5 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | Ast::Add(x, y) |
b7449926 XL |
5 | | ^^^^^^^^ |
6 | | | |
e74abb32 | 7 | note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 6:16... |
0731742a | 8 | --> $DIR/regions-creating-enums4.rs:6:16 |
b7449926 | 9 | | |
0731742a | 10 | LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> { |
b7449926 | 11 | | ^^ |
60c5eb7d XL |
12 | note: ...so that the expression is assignable |
13 | --> $DIR/regions-creating-enums4.rs:7:14 | |
14 | | | |
15 | LL | Ast::Add(x, y) | |
16 | | ^ | |
17 | = note: expected `&Ast<'_>` | |
18 | found `&Ast<'a>` | |
e74abb32 | 19 | note: but, the lifetime must be valid for the lifetime `'b` as defined on the function body at 6:19... |
0731742a | 20 | --> $DIR/regions-creating-enums4.rs:6:19 |
b7449926 | 21 | | |
0731742a | 22 | LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> { |
b7449926 | 23 | | ^^ |
60c5eb7d XL |
24 | note: ...so that the expression is assignable |
25 | --> $DIR/regions-creating-enums4.rs:7:5 | |
26 | | | |
27 | LL | Ast::Add(x, y) | |
28 | | ^^^^^^^^^^^^^^ | |
29 | = note: expected `Ast<'b>` | |
30 | found `Ast<'_>` | |
b7449926 XL |
31 | |
32 | error: aborting due to previous error | |
33 | ||
e74abb32 | 34 | For more information about this error, try `rustc --explain E0495`. |