1 error[E0308]: mismatched types
2 --> $DIR/regions-infer-not-param.rs:25:54
4 LL | fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched types
7 = note: expected type `direct<'b>`
8 found type `direct<'a>`
9 note: the lifetime 'a as defined on the function body at 25:16...
10 --> $DIR/regions-infer-not-param.rs:25:16
12 LL | fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched types
14 note: ...does not necessarily outlive the lifetime 'b as defined on the function body at 25:19
15 --> $DIR/regions-infer-not-param.rs:25:19
17 LL | fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched types
20 error[E0308]: mismatched types
21 --> $DIR/regions-infer-not-param.rs:29:63
23 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
26 = note: expected type `indirect2<'b>`
27 found type `indirect2<'a>`
28 note: the lifetime 'a as defined on the function body at 29:19...
29 --> $DIR/regions-infer-not-param.rs:29:19
31 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
33 note: ...does not necessarily outlive the lifetime 'b as defined on the function body at 29:22
34 --> $DIR/regions-infer-not-param.rs:29:22
36 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
39 error[E0308]: mismatched types
40 --> $DIR/regions-infer-not-param.rs:29:63
42 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
45 = note: expected type `indirect2<'b>`
46 found type `indirect2<'a>`
47 note: the lifetime 'b as defined on the function body at 29:22...
48 --> $DIR/regions-infer-not-param.rs:29:22
50 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
52 note: ...does not necessarily outlive the lifetime 'a as defined on the function body at 29:19
53 --> $DIR/regions-infer-not-param.rs:29:19
55 LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
58 error: aborting due to 3 previous errors
60 For more information about this error, try `rustc --explain E0308`.