rust/src/test/ui/regions/regions-infer-not-param.nll.stderr

27 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
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
2018-08-14 15:26:33 -05:00
| -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b`
2018-08-08 07:28:26 -05:00
| |
| 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
2018-08-14 15:26:33 -05:00
| -- -- lifetime `'b` defined here ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
2018-08-08 07:28:26 -05:00
| |
| 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
2018-08-14 15:26:33 -05:00
| -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b`
2018-08-08 07:28:26 -05:00
| |
| lifetime `'a` defined here
error: aborting due to 3 previous errors