Skip to content

Commit 59e64e9

Browse files
committed
Updated affected tests.
1 parent e01e883 commit 59e64e9

17 files changed

+65
-71
lines changed

src/test/ui/borrowck/issue-45983.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: not reporting region error due to nll
44
LL | give_any(|y| x = Some(y));
55
| ^
66

7-
error: free region `` does not outlive free region `'_#2r`
7+
error: Assignment requires that data must outlive free region `'_#2r`
88
--> $DIR/issue-45983.rs:17:27
99
|
1010
LL | give_any(|y| x = Some(y));

src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: not reporting region error due to nll
44
LL | with_int(|y| x = Some(y));
55
| ^
66

7-
error: free region `` does not outlive free region `'_#2r`
7+
error: Assignment requires that data must outlive free region `'_#2r`
88
--> $DIR/regions-escape-bound-fn-2.rs:18:27
99
|
1010
LL | with_int(|y| x = Some(y));

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn case1() {
3131
foo(cell, |cell_a, cell_x| {
3232
//~^ WARNING not reporting region error due to nll
3333
cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
34-
//~^ ERROR does not outlive free region
34+
//~^ ERROR Argument requires that data must outlive free region
3535
})
3636
}
3737

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ warning: not reporting region error due to nll
44
LL | foo(cell, |cell_a, cell_x| {
55
| ^^^
66

7-
error: free region `ReFree(DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `'_#1r`
8-
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9
7+
error: Argument requires that data must outlive free region `'_#1r`
8+
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:20
99
|
1010
LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
11-
| ^^^^^^
11+
| ^^^^^^^^^^^^
1212

1313
note: No external requirements
1414
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15
@@ -17,7 +17,7 @@ LL | foo(cell, |cell_a, cell_x| {
1717
| _______________^
1818
LL | | //~^ WARNING not reporting region error due to nll
1919
LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
20-
LL | | //~^ ERROR does not outlive free region
20+
LL | | //~^ ERROR Argument requires that data must outlive free region
2121
LL | | })
2222
| |_____^
2323
|

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn demand_y<'x, 'y>(_cell_x: &Cell<&'x u32>, _cell_y: &Cell<&'y u32>, _y: &'y u3
4343
#[rustc_regions]
4444
fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4545
establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
46-
//~^ ERROR does not outlive free region
46+
//~^ ERROR Argument requires that data must outlive free region
4747

4848
// Only works if 'x: 'y:
4949
demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: External requirements
99
|
1010
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
1111
| _______________________________________________^
12-
LL | | //~^ ERROR does not outlive free region
12+
LL | | //~^ ERROR Argument requires that data must outlive free region
1313
LL | |
1414
LL | | // Only works if 'x: 'y:
1515
LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
@@ -23,12 +23,11 @@ LL | | });
2323
= note: number of external vids: 2
2424
= note: where '_#1r: '_#0r
2525

26-
error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic`
27-
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47
26+
error: Argument requires that data must outlive free region `ReStatic`
27+
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5
2828
|
29-
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
30-
| _______________________________________________^
31-
LL | | //~^ ERROR does not outlive free region
29+
LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
30+
LL | | //~^ ERROR Argument requires that data must outlive free region
3231
LL | |
3332
LL | | // Only works if 'x: 'y:
3433
LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
@@ -40,7 +39,7 @@ note: No external requirements
4039
|
4140
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4241
LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
43-
LL | | //~^ ERROR does not outlive free region
42+
LL | | //~^ ERROR Argument requires that data must outlive free region
4443
LL | |
4544
... |
4645
LL | | });

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn demand_y<'x, 'y>(_cell_x: &Cell<&'x u32>, _cell_y: &Cell<&'y u32>, _y: &'y u3
4646
#[rustc_regions]
4747
fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4848
establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
49-
//~^ ERROR does not outlive free region
49+
//~^ ERROR Argument requires that data must outlive free region
5050
// Only works if 'x: 'y:
5151
demand_y(x, y, x.get())
5252
//~^ WARNING not reporting region error due to nll

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: External requirements
99
|
1010
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
1111
| _______________________________________________^
12-
LL | | //~^ ERROR does not outlive free region
12+
LL | | //~^ ERROR Argument requires that data must outlive free region
1313
LL | | // Only works if 'x: 'y:
1414
LL | | demand_y(x, y, x.get())
1515
LL | | //~^ WARNING not reporting region error due to nll
@@ -23,12 +23,11 @@ LL | | });
2323
= note: number of external vids: 3
2424
= note: where '_#1r: '_#0r
2525

26-
error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic`
27-
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47
26+
error: Argument requires that data must outlive free region `ReStatic`
27+
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5
2828
|
29-
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
30-
| _______________________________________________^
31-
LL | | //~^ ERROR does not outlive free region
29+
LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
30+
LL | | //~^ ERROR Argument requires that data must outlive free region
3231
LL | | // Only works if 'x: 'y:
3332
LL | | demand_y(x, y, x.get())
3433
LL | | //~^ WARNING not reporting region error due to nll
@@ -40,7 +39,7 @@ note: No external requirements
4039
|
4140
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4241
LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
43-
LL | | //~^ ERROR does not outlive free region
42+
LL | | //~^ ERROR Argument requires that data must outlive free region
4443
LL | | // Only works if 'x: 'y:
4544
... |
4645
LL | | });

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4646
// Only works if 'x: 'y:
4747
demand_y(x, y, x.get())
4848
//~^ WARN not reporting region error due to nll
49-
//~| ERROR does not outlive free region
49+
//~| ERROR Argument requires that data must outlive free region
5050
});
5151
}
5252

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ warning: not reporting region error due to nll
44
LL | demand_y(x, y, x.get())
55
| ^^^^^^^^^^^^^^^^^^^^^^^
66

7-
error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))`
8-
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:18
7+
error: Argument requires that data must outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))`
8+
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
99
|
1010
LL | demand_y(x, y, x.get())
11-
| ^
11+
| ^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
note: No external requirements
1414
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
@@ -18,7 +18,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
1818
LL | | // Only works if 'x: 'y:
1919
LL | | demand_y(x, y, x.get())
2020
LL | | //~^ WARN not reporting region error due to nll
21-
LL | | //~| ERROR does not outlive free region
21+
LL | | //~| ERROR Argument requires that data must outlive free region
2222
LL | | });
2323
| |_____^
2424
|

0 commit comments

Comments
 (0)