rust/src/test/ui/regions/regions-bounds.nll.stderr

23 lines
717 B
Plaintext
Raw Normal View History

error: lifetime may not live long enough
--> $DIR/regions-bounds.rs:9:12
|
LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | return e;
| ^ returning this value requires that `'a` must outlive `'b`
error: lifetime may not live long enough
--> $DIR/regions-bounds.rs:13:12
|
LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | return e;
| ^ returning this value requires that `'a` must outlive `'b`
error: aborting due to 2 previous errors