| ----------^^^^^-----------------
| | | |
| | | free region requires that `'1` must outlive `'2`
- | | lifetime `'1` appears in this argument
+ | | has type `&'1i32`
| lifetime `'2` appears in return type
error: aborting due to previous error
| |_____|
| ||
LL | || &mut x
- | || ^^^^^^ free region requires that `'1` must outlive `'2`
+ | || ^^^^^^ return requires that `'1` must outlive `'2`
LL | || };
| || -
| ||_____|
| ^^^^^
error: unsatisfied lifetime constraints
- --> $DIR/issue-52213.rs:13:11
+ --> $DIR/issue-52213.rs:12:11
|
-LL | ((u,),) => u,
- | ^ free region requires that `'a` must outlive `'b`
+LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime
+ | ^^^^^ free region requires that `'a` must outlive `'b`
error: aborting due to previous error
--> $DIR/issue-52533.rs:15:16
|
LL | foo(|a, b| b)
- | - - ^ free region requires that `'1` must outlive `'2`
+ | - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
| | |
- | | lifetime `'1` appears in this argument
- | lifetime `'2` appears in this argument
+ | | has type `&'1u32`
+ | has type `&'2u32`
error: aborting due to previous error
LL | let mut closure = expect_sig(|p, y| *p = y);
| - - ^^^^^^ free region requires that `'1` must outlive `'2`
| | |
- | | lifetime `'1` appears in this argument
- | lifetime `'2` appears in this argument
+ | | has type `&'1 i32`
+ | has type `&'2 mut &'3 i32`
note: No external requirements
--> $DIR/escape-argument-callee.rs:36:38
--> $DIR/propagate-approximated-fail-no-postdom.rs:57:13
|
LL | |_outlives1, _outlives2, _outlives3, x, y| {
- | ---------- ---------- lifetime `'2` appears in this argument
+ | ---------- ---------- has type `std::cell::Cell<&'3 &'4 u32>`
| |
- | lifetime `'1` appears in this argument
+ | has type `std::cell::Cell<&'1 &'2 u32>`
...
LL | demand_y(x, y, p) //~ ERROR
- | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
+ | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'3`
note: No external requirements
--> $DIR/propagate-approximated-fail-no-postdom.rs:53:9
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
- | --------- - lifetime `'1` appears in this argument
+ | --------- - has type `&'1 std::cell::Cell<&'2 u32>`
| |
- | lifetime `'2` appears in this argument
+ | has type `&'3 std::cell::Cell<&'4 &'5 u32>`
LL | // Only works if 'x: 'y:
LL | demand_y(x, y, x.get())
- | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
+ | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'3`
note: No external requirements
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
- | ---------- ---------- lifetime `'2` appears in this argument
+ | ---------- ---------- has type `&'4 std::cell::Cell<&'5 &'6 u32>`
| |
- | lifetime `'1` appears in this argument
+ | has type `&'1 std::cell::Cell<&'2 &'3 u32>`
LL | // Only works if 'x: 'y:
LL | demand_y(x, y, x.get())
- | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
+ | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'4`
note: No external requirements
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47
--> $DIR/return-wrong-bound-region.rs:21:23
|
LL | expect_sig(|a, b| b); // ought to return `a`
- | - - ^ free region requires that `'1` must outlive `'2`
+ | - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
| | |
- | | lifetime `'1` appears in this argument
- | lifetime `'2` appears in this argument
+ | | has type `&'1 i32`
+ | has type `&'2 i32`
note: No external requirements
--> $DIR/return-wrong-bound-region.rs:21:16