1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2 --> $DIR/regions-creating-enums4.rs:7:5
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
8 --> $DIR/regions-creating-enums4.rs:6:16
10 LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
12 note: ...so that the expression is assignable
13 --> $DIR/regions-creating-enums4.rs:7:14
17 = note: expected `&Ast<'_>`
19 note: but, the lifetime must be valid for the lifetime `'b` as defined here...
20 --> $DIR/regions-creating-enums4.rs:6:19
22 LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
24 note: ...so that the types are compatible
25 --> $DIR/regions-creating-enums4.rs:7:5
29 = note: expected `Ast<'b>`
32 error: aborting due to previous error
34 For more information about this error, try `rustc --explain E0495`.