Skip to content

Commit a11245f

Browse files
committed
Ensure that changed errors are lower case.
1 parent 59e64e9 commit a11245f

18 files changed

+45
-45
lines changed

src/librustc_mir/borrow_check/nll/region_infer/error_reporting.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ enum ConstraintCategory {
3737
impl fmt::Display for ConstraintCategory {
3838
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3939
match self {
40-
ConstraintCategory::Assignment => write!(f, "Assignment"),
41-
ConstraintCategory::Return => write!(f, "Return"),
42-
ConstraintCategory::Cast => write!(f, "Cast"),
43-
ConstraintCategory::CallArgument => write!(f, "Argument"),
44-
_ => write!(f, "Free region"),
40+
ConstraintCategory::Assignment => write!(f, "assignment"),
41+
ConstraintCategory::Return => write!(f, "return"),
42+
ConstraintCategory::Cast => write!(f, "cast"),
43+
ConstraintCategory::CallArgument => write!(f, "argument"),
44+
_ => write!(f, "free region"),
4545
}
4646
}
4747
}

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: Assignment requires that data must 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: Assignment requires that data must 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 Argument requires that data must 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: not reporting region error due to nll
44
LL | foo(cell, |cell_a, cell_x| {
55
| ^^^
66

7-
error: Argument requires that data must outlive free region `'_#1r`
7+
error: argument requires that data must outlive free region `'_#1r`
88
--> $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
@@ -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 Argument requires that data must 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 Argument requires that data must 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: 4 additions & 4 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 Argument requires that data must 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,11 +23,11 @@ LL | | });
2323
= note: number of external vids: 2
2424
= note: where '_#1r: '_#0r
2525

26-
error: Argument requires that data must outlive free region `ReStatic`
26+
error: argument requires that data must outlive free region `ReStatic`
2727
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5
2828
|
2929
LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
30-
LL | | //~^ ERROR Argument requires that data must outlive free region
30+
LL | | //~^ ERROR argument requires that data must outlive free region
3131
LL | |
3232
LL | | // Only works if 'x: 'y:
3333
LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
@@ -39,7 +39,7 @@ note: No external requirements
3939
|
4040
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4141
LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
42-
LL | | //~^ ERROR Argument requires that data must outlive free region
42+
LL | | //~^ ERROR argument requires that data must outlive free region
4343
LL | |
4444
... |
4545
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 Argument requires that data must 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: 4 additions & 4 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 Argument requires that data must 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,11 +23,11 @@ LL | | });
2323
= note: number of external vids: 3
2424
= note: where '_#1r: '_#0r
2525

26-
error: Argument requires that data must outlive free region `ReStatic`
26+
error: argument requires that data must outlive free region `ReStatic`
2727
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5
2828
|
2929
LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
30-
LL | | //~^ ERROR Argument requires that data must outlive free region
30+
LL | | //~^ ERROR argument requires that data must outlive free region
3131
LL | | // Only works if 'x: 'y:
3232
LL | | demand_y(x, y, x.get())
3333
LL | | //~^ WARNING not reporting region error due to nll
@@ -39,7 +39,7 @@ note: No external requirements
3939
|
4040
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
4141
LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
42-
LL | | //~^ ERROR Argument requires that data must outlive free region
42+
LL | | //~^ ERROR argument requires that data must outlive free region
4343
LL | | // Only works if 'x: 'y:
4444
... |
4545
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 Argument requires that data must 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: not reporting region error due to nll
44
LL | demand_y(x, y, x.get())
55
| ^^^^^^^^^^^^^^^^^^^^^^^
66

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))`
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))`
88
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
99
|
1010
LL | demand_y(x, y, x.get())
@@ -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 Argument requires that data must 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 Argument requires that data must 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 Argument requires that data must 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 Argument requires that data must outlive free region
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ 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: 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))`
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))`
4444
--> $DIR/projection-one-region-closure.rs:55:5
4545
|
4646
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -54,7 +54,7 @@ LL | | where
5454
LL | | T: Anything<'b>,
5555
LL | | {
5656
... |
57-
LL | | //~| ERROR Argument requires that data must outlive free region
57+
LL | | //~| ERROR argument requires that data must outlive free region
5858
LL | | }
5959
| |_^
6060
|
@@ -88,7 +88,7 @@ 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: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
91+
error: argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
9292
--> $DIR/projection-one-region-closure.rs:67:5
9393
|
9494
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -102,7 +102,7 @@ LL | | where
102102
LL | | T: Anything<'b>,
103103
LL | | 'a: 'a,
104104
... |
105-
LL | | //~| ERROR Argument requires that data must outlive free region
105+
LL | | //~| ERROR argument requires that data must outlive free region
106106
LL | | }
107107
| |_^
108108
|
@@ -137,7 +137,7 @@ 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: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
140+
error: argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
141141
--> $DIR/projection-one-region-closure.rs:89:5
142142
|
143143
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -151,7 +151,7 @@ LL | | where
151151
LL | | T: Anything<'b>,
152152
LL | | T::AssocType: 'a,
153153
... |
154-
LL | | //~| ERROR Argument requires that data must outlive free region
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 Argument requires that data must 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 Argument requires that data must 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 Argument requires that data must 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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ 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: 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))`
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))`
3535
--> $DIR/projection-one-region-trait-bound-closure.rs:47:5
3636
|
3737
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -45,7 +45,7 @@ LL | | where
4545
LL | | T: Anything<'b>,
4646
LL | | {
4747
... |
48-
LL | | //~| ERROR Argument requires that data must outlive free region
48+
LL | | //~| ERROR argument requires that data must outlive free region
4949
LL | | }
5050
| |_^
5151
|
@@ -70,7 +70,7 @@ 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: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
73+
error: argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
7474
--> $DIR/projection-one-region-trait-bound-closure.rs:58:5
7575
|
7676
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -84,7 +84,7 @@ LL | | where
8484
LL | | T: Anything<'b>,
8585
LL | | 'a: 'a,
8686
... |
87-
LL | | //~| ERROR Argument requires that data must outlive free region
87+
LL | | //~| ERROR argument requires that data must outlive free region
8888
LL | | }
8989
| |_^
9090
|
@@ -110,7 +110,7 @@ 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: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
113+
error: argument requires that data must outlive free region `ReEarlyBound(0, 'a)`
114114
--> $DIR/projection-one-region-trait-bound-closure.rs:79:5
115115
|
116116
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -124,7 +124,7 @@ LL | | where
124124
LL | | T: Anything<'b>,
125125
LL | | T::AssocType: 'a,
126126
... |
127-
LL | | //~| ERROR Argument requires that data must 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 Argument requires that data must outlive free region
110+
//~| ERROR argument requires that data must outlive free region
111111
}
112112

113113
#[rustc_regions]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
239239
= note: number of external vids: 3
240240
= note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
241241

242-
error: Argument requires that data must outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))`
242+
error: argument requires that data must outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))`
243243
--> $DIR/projection-two-region-trait-bound-closure.rs:108:5
244244
|
245245
LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -253,7 +253,7 @@ LL | | where
253253
LL | | T: Anything<'b, 'b>,
254254
LL | | {
255255
... |
256-
LL | | //~| ERROR Argument requires that data must outlive free region
256+
LL | | //~| ERROR argument requires that data must outlive free region
257257
LL | | }
258258
| |_^
259259
|

src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ warning: not reporting region error due to nll
2222
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
2323
| ^^^^^^^^^^^^^^^^^^^^^^
2424

25-
error: Cast requires that data must outlive free region `'static`
25+
error: cast requires that data must outlive free region `'static`
2626
--> $DIR/dyn-trait-underscore.rs:18:5
2727
|
2828
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime

0 commit comments

Comments
 (0)