1 error: lifetime may not live long enough
2 --> $DIR/project-fn-ret-invariant.rs:40:13
4 LL | fn baz<'a, 'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) {
5 | -- -- lifetime `'b` defined here
7 | lifetime `'a` defined here
8 LL | let f = foo; // <-- No consistent type can be inferred for `f` here.
9 LL | let a = bar(f, x);
10 | ^^^^^^^^^ argument requires that `'a` must outlive `'b`
12 = help: consider adding the following bound: `'a: 'b`
13 = note: requirement occurs because of the type `Type<'_>`, which makes the generic argument `'_` invariant
14 = note: the struct `Type<'a>` is invariant over the parameter `'a`
15 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
17 error: lifetime may not live long enough
18 --> $DIR/project-fn-ret-invariant.rs:42:13
20 LL | fn baz<'a, 'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) {
21 | -- -- lifetime `'b` defined here
23 | lifetime `'a` defined here
25 LL | let b = bar(f, y);
26 | ^^^^^^^^^ argument requires that `'b` must outlive `'a`
28 = help: consider adding the following bound: `'b: 'a`
29 = note: requirement occurs because of the type `Type<'_>`, which makes the generic argument `'_` invariant
30 = note: the struct `Type<'a>` is invariant over the parameter `'a`
31 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
33 help: `'a` and `'b` must be the same: replace one with the other
35 error: aborting due to 2 previous errors