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 on the function body at 6:16...
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:
15 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 6:19...
16 --> $DIR/regions-creating-enums4.rs:6:19
18 LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
20 = note: ...so that the expression is assignable:
24 error: aborting due to previous error
26 For more information about this error, try `rustc --explain E0495`.