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