Skip to content

Commit 5282d7d

Browse files
committed
Update affected tests.
1 parent d4be95f commit 5282d7d

9 files changed

+22
-22
lines changed

src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
1111
| ----------^^^^^-----------------
1212
| | | |
1313
| | | free region requires that `'1` must outlive `'2`
14-
| | lifetime `'1` appears in this argument
14+
| | has type `&'1i32`
1515
| lifetime `'2` appears in return type
1616

1717
error: aborting due to previous error

src/test/ui/issue-40510-1.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | || {
66
| |_____|
77
| ||
88
LL | || &mut x
9-
| || ^^^^^^ free region requires that `'1` must outlive `'2`
9+
| || ^^^^^^ return requires that `'1` must outlive `'2`
1010
LL | || };
1111
| || -
1212
| ||_____|

src/test/ui/issue-52213.nll.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime
55
| ^^^^^
66

77
error: unsatisfied lifetime constraints
8-
--> $DIR/issue-52213.rs:13:11
8+
--> $DIR/issue-52213.rs:12:11
99
|
10-
LL | ((u,),) => u,
11-
| ^ free region requires that `'a` must outlive `'b`
10+
LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime
11+
| ^^^^^ free region requires that `'a` must outlive `'b`
1212

1313
error: aborting due to previous error
1414

src/test/ui/issue-52533.nll.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ error: unsatisfied lifetime constraints
88
--> $DIR/issue-52533.rs:15:16
99
|
1010
LL | foo(|a, b| b)
11-
| - - ^ free region requires that `'1` must outlive `'2`
11+
| - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
1212
| | |
13-
| | lifetime `'1` appears in this argument
14-
| lifetime `'2` appears in this argument
13+
| | has type `&'1u32`
14+
| has type `&'2u32`
1515

1616
error: aborting due to previous error
1717

src/test/ui/nll/closure-requirements/escape-argument-callee.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ error: unsatisfied lifetime constraints
1010
LL | let mut closure = expect_sig(|p, y| *p = y);
1111
| - - ^^^^^^ free region requires that `'1` must outlive `'2`
1212
| | |
13-
| | lifetime `'1` appears in this argument
14-
| lifetime `'2` appears in this argument
13+
| | has type `&'1 i32`
14+
| has type `&'2 mut &'3 i32`
1515

1616
note: No external requirements
1717
--> $DIR/escape-argument-callee.rs:36:38

src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ error: unsatisfied lifetime constraints
88
--> $DIR/propagate-approximated-fail-no-postdom.rs:57:13
99
|
1010
LL | |_outlives1, _outlives2, _outlives3, x, y| {
11-
| ---------- ---------- lifetime `'2` appears in this argument
11+
| ---------- ---------- has type `std::cell::Cell<&'3 &'4 u32>`
1212
| |
13-
| lifetime `'1` appears in this argument
13+
| has type `std::cell::Cell<&'1 &'2 u32>`
1414
...
1515
LL | demand_y(x, y, p) //~ ERROR
16-
| ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
16+
| ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'3`
1717

1818
note: No external requirements
1919
--> $DIR/propagate-approximated-fail-no-postdom.rs:53:9

src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ error: unsatisfied lifetime constraints
88
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
99
|
1010
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
11-
| --------- - lifetime `'1` appears in this argument
11+
| --------- - has type `&'1 std::cell::Cell<&'2 u32>`
1212
| |
13-
| lifetime `'2` appears in this argument
13+
| has type `&'3 std::cell::Cell<&'4 &'5 u32>`
1414
LL | // Only works if 'x: 'y:
1515
LL | demand_y(x, y, x.get())
16-
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
16+
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'3`
1717

1818
note: No external requirements
1919
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47

src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ error: unsatisfied lifetime constraints
88
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9
99
|
1010
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
11-
| ---------- ---------- lifetime `'2` appears in this argument
11+
| ---------- ---------- has type `&'4 std::cell::Cell<&'5 &'6 u32>`
1212
| |
13-
| lifetime `'1` appears in this argument
13+
| has type `&'1 std::cell::Cell<&'2 &'3 u32>`
1414
LL | // Only works if 'x: 'y:
1515
LL | demand_y(x, y, x.get())
16-
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
16+
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'4`
1717

1818
note: No external requirements
1919
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47

src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ error: unsatisfied lifetime constraints
88
--> $DIR/return-wrong-bound-region.rs:21:23
99
|
1010
LL | expect_sig(|a, b| b); // ought to return `a`
11-
| - - ^ free region requires that `'1` must outlive `'2`
11+
| - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
1212
| | |
13-
| | lifetime `'1` appears in this argument
14-
| lifetime `'2` appears in this argument
13+
| | has type `&'1 i32`
14+
| has type `&'2 i32`
1515

1616
note: No external requirements
1717
--> $DIR/return-wrong-bound-region.rs:21:16

0 commit comments

Comments
 (0)