Skip to content

Commit 8277ba2

Browse files
committed
Make "all possible cases" help message uniform with existing help messages
Specifically no capitalisation or trailing full stops.
1 parent 3d28ee3 commit 8277ba2

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/librustc_mir/hair/pattern/check_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ impl<'a, 'tcx> MatchVisitor<'a, 'tcx> {
238238
is non-empty",
239239
pat_ty));
240240
span_help!(&mut err, scrut.span,
241-
"Please ensure that all possible cases are being handled; \
242-
possibly adding wildcards or more match arms.");
241+
"ensure that all possible cases are being handled, \
242+
possibly by adding wildcards or more match arms");
243243
err.emit();
244244
}
245245
// If the type *is* uninhabited, it's vacuously exhaustive

src/test/ui/error-codes/E0004-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0004]: non-exhaustive patterns: type std::option::Option<i32> is non-empt
44
LL | match x { } //~ ERROR E0004
55
| ^
66
|
7-
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
7+
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
88
--> $DIR/E0004-2.rs:14:11
99
|
1010
LL | match x { } //~ ERROR E0004

src/test/ui/issues/issue-3096-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0004]: non-exhaustive patterns: type () is non-empty
44
LL | match () { } //~ ERROR non-exhaustive
55
| ^^
66
|
7-
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
7+
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
88
--> $DIR/issue-3096-1.rs:12:11
99
|
1010
LL | match () { } //~ ERROR non-exhaustive

src/test/ui/issues/issue-3096-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0004]: non-exhaustive patterns: type *const bottom is non-empty
44
LL | match x { } //~ ERROR non-exhaustive patterns
55
| ^
66
|
7-
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
7+
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
88
--> $DIR/issue-3096-2.rs:15:11
99
|
1010
LL | match x { } //~ ERROR non-exhaustive patterns

src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0004]: non-exhaustive patterns: type &Void is non-empty
1010
LL | let _ = match x {}; //~ ERROR non-exhaustive
1111
| ^
1212
|
13-
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
13+
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
1414
--> $DIR/uninhabited-matches-feature-gated.rs:20:19
1515
|
1616
LL | let _ = match x {}; //~ ERROR non-exhaustive
@@ -22,7 +22,7 @@ error[E0004]: non-exhaustive patterns: type (Void,) is non-empty
2222
LL | let _ = match x {}; //~ ERROR non-exhaustive
2323
| ^
2424
|
25-
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
25+
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2626
--> $DIR/uninhabited-matches-feature-gated.rs:23:19
2727
|
2828
LL | let _ = match x {}; //~ ERROR non-exhaustive
@@ -34,7 +34,7 @@ error[E0004]: non-exhaustive patterns: type [Void; 1] is non-empty
3434
LL | let _ = match x {}; //~ ERROR non-exhaustive
3535
| ^
3636
|
37-
help: Please ensure that all possible cases are being handled; possibly adding wildcards or more match arms.
37+
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
3838
--> $DIR/uninhabited-matches-feature-gated.rs:26:19
3939
|
4040
LL | let _ = match x {}; //~ ERROR non-exhaustive

0 commit comments

Comments
 (0)