27 lines
1.2 KiB
Plaintext
27 lines
1.2 KiB
Plaintext
error: unsatisfied lifetime constraints
|
|
--> $DIR/regions-infer-not-param.rs:25:54
|
|
|
|
|
LL | fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched types
|
|
| -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b`
|
|
| |
|
|
| lifetime `'a` defined here
|
|
|
|
error: unsatisfied lifetime constraints
|
|
--> $DIR/regions-infer-not-param.rs:29:63
|
|
|
|
|
LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
|
|
| -- -- 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: unsatisfied lifetime constraints
|
|
--> $DIR/regions-infer-not-param.rs:29:63
|
|
|
|
|
LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
|
|
| -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b`
|
|
| |
|
|
| lifetime `'a` defined here
|
|
|
|
error: aborting due to 3 previous errors
|
|
|