blob: 2064b060ec419fcd1cfffab4a3e7f6b8a2bd9647 [file] [log] [blame]
error: lifetime may not live long enough
--> $DIR/regions-infer-not-param.rs:15:54
|
LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p }
| -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b`
| |
| lifetime `'a` defined here
error: lifetime may not live long enough
--> $DIR/regions-infer-not-param.rs:19:63
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
| -- -- lifetime `'b` defined here ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
| |
| lifetime `'a` defined here
error: lifetime may not live long enough
--> $DIR/regions-infer-not-param.rs:19:63
|
LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
| -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b`
| |
| lifetime `'a` defined here
error: aborting due to 3 previous errors