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
|

src/test/ui/nll/ty-outlives/projection-one-region-closure.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ where
5555
with_signature(cell, t, |cell, t| require(cell, t));
5656
//~^ WARNING not reporting region error due to nll
5757
//~| ERROR the parameter type `T` may not live long enough
58-
//~| ERROR does not outlive free region
58+
//~| ERROR Argument requires that data must outlive free region
5959
}
6060

6161
#[rustc_regions]
@@ -67,7 +67,7 @@ where
6767
with_signature(cell, t, |cell, t| require(cell, t));
6868
//~^ WARNING not reporting region error due to nll
6969
//~| ERROR the parameter type `T` may not live long enough
70-
//~| ERROR does not outlive free region
70+
//~| ERROR Argument requires that data must outlive free region
7171
}
7272

7373
#[rustc_regions]
@@ -89,7 +89,7 @@ where
8989
with_signature(cell, t, |cell, t| require(cell, t));
9090
//~^ WARNING not reporting region error due to nll
9191
//~| ERROR the parameter type `T` may not live long enough
92-
//~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
92+
//~| ERROR Argument requires that data must outlive free region
9393
}
9494

9595
#[rustc_regions]

src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
4040
|
4141
= help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...
4242

43-
error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
44-
--> $DIR/projection-one-region-closure.rs:55:20
43+
error: Argument requires that data must outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
44+
--> $DIR/projection-one-region-closure.rs:55:5
4545
|
4646
LL | with_signature(cell, t, |cell, t| require(cell, t));
47-
| ^^^^
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4848

4949
note: No external requirements
5050
--> $DIR/projection-one-region-closure.rs:51:1
@@ -54,7 +54,7 @@ LL | | where
5454
LL | | T: Anything<'b>,
5555
LL | | {
5656
... |
57-
LL | | //~| ERROR does not outlive free region
57+
LL | | //~| ERROR Argument requires that data must outlive free region
5858
LL | | }
5959
| |_^
6060
|
@@ -88,11 +88,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
8888
|
8989
= help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
9090

91-
error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
92-
--> $DIR/projection-one-region-closure.rs:67:20
91+
error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
92+
--> $DIR/projection-one-region-closure.rs:67:5
9393
|
9494
LL | with_signature(cell, t, |cell, t| require(cell, t));
95-
| ^^^^
95+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9696

9797
note: No external requirements
9898
--> $DIR/projection-one-region-closure.rs:62:1
@@ -102,7 +102,7 @@ LL | | where
102102
LL | | T: Anything<'b>,
103103
LL | | 'a: 'a,
104104
... |
105-
LL | | //~| ERROR does not outlive free region
105+
LL | | //~| ERROR Argument requires that data must outlive free region
106106
LL | | }
107107
| |_^
108108
|
@@ -137,11 +137,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
137137
|
138138
= help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
139139

140-
error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
141-
--> $DIR/projection-one-region-closure.rs:89:20
140+
error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
141+
--> $DIR/projection-one-region-closure.rs:89:5
142142
|
143143
LL | with_signature(cell, t, |cell, t| require(cell, t));
144-
| ^^^^
144+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145145

146146
note: No external requirements
147147
--> $DIR/projection-one-region-closure.rs:74:1
@@ -151,7 +151,7 @@ LL | | where
151151
LL | | T: Anything<'b>,
152152
LL | | T::AssocType: 'a,
153153
... |
154-
LL | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
154+
LL | | //~| ERROR Argument requires that data must outlive free region
155155
LL | | }
156156
| |_^
157157
|

src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ where
4646
{
4747
with_signature(cell, t, |cell, t| require(cell, t));
4848
//~^ WARNING 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
#[rustc_regions]
@@ -57,7 +57,7 @@ where
5757
{
5858
with_signature(cell, t, |cell, t| require(cell, t));
5959
//~^ WARNING not reporting region error due to nll
60-
//~| ERROR does not outlive free region
60+
//~| ERROR Argument requires that data must outlive free region
6161
}
6262

6363
#[rustc_regions]
@@ -78,7 +78,7 @@ where
7878

7979
with_signature(cell, t, |cell, t| require(cell, t));
8080
//~^ WARNING not reporting region error due to nll
81-
//~| ERROR does not outlive free region
81+
//~| ERROR Argument requires that data must outlive free region
8282
}
8383

8484
#[rustc_regions]

src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
3131
= note: number of external vids: 3
3232
= note: where '_#1r: '_#2r
3333

34-
error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
35-
--> $DIR/projection-one-region-trait-bound-closure.rs:47:20
34+
error: Argument requires that data must outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
35+
--> $DIR/projection-one-region-trait-bound-closure.rs:47:5
3636
|
3737
LL | with_signature(cell, t, |cell, t| require(cell, t));
38-
| ^^^^
38+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3939

4040
note: No external requirements
4141
--> $DIR/projection-one-region-trait-bound-closure.rs:43:1
@@ -45,7 +45,7 @@ LL | | where
4545
LL | | T: Anything<'b>,
4646
LL | | {
4747
... |
48-
LL | | //~| ERROR does not outlive free region
48+
LL | | //~| ERROR Argument requires that data must outlive free region
4949
LL | | }
5050
| |_^
5151
|
@@ -70,11 +70,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
7070
= note: number of external vids: 4
7171
= note: where '_#2r: '_#3r
7272

73-
error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
74-
--> $DIR/projection-one-region-trait-bound-closure.rs:58:20
73+
error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
74+
--> $DIR/projection-one-region-trait-bound-closure.rs:58:5
7575
|
7676
LL | with_signature(cell, t, |cell, t| require(cell, t));
77-
| ^^^^
77+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7878

7979
note: No external requirements
8080
--> $DIR/projection-one-region-trait-bound-closure.rs:53:1
@@ -84,7 +84,7 @@ LL | | where
8484
LL | | T: Anything<'b>,
8585
LL | | 'a: 'a,
8686
... |
87-
LL | | //~| ERROR does not outlive free region
87+
LL | | //~| ERROR Argument requires that data must outlive free region
8888
LL | | }
8989
| |_^
9090
|
@@ -110,11 +110,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
110110
= note: number of external vids: 4
111111
= note: where '_#2r: '_#3r
112112

113-
error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
114-
--> $DIR/projection-one-region-trait-bound-closure.rs:79:20
113+
error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
114+
--> $DIR/projection-one-region-trait-bound-closure.rs:79:5
115115
|
116116
LL | with_signature(cell, t, |cell, t| require(cell, t));
117-
| ^^^^
117+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118118

119119
note: No external requirements
120120
--> $DIR/projection-one-region-trait-bound-closure.rs:64:1
@@ -124,7 +124,7 @@ LL | | where
124124
LL | | T: Anything<'b>,
125125
LL | | T::AssocType: 'a,
126126
... |
127-
LL | | //~| ERROR does not outlive free region
127+
LL | | //~| ERROR Argument requires that data must outlive free region
128128
LL | | }
129129
| |_^
130130
|

src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ where
107107
{
108108
with_signature(cell, t, |cell, t| require(cell, t));
109109
//~^ WARNING not reporting region error due to nll
110-
//~| ERROR does not outlive free region
110+
//~| ERROR Argument requires that data must outlive free region
111111
}
112112

113113
#[rustc_regions]

0 commit comments

Comments
 (0)