Skip to content

Commit 034e659

Browse files
committed
Changing label to "this is an..."
1 parent eeda69f commit 034e659

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/librustc_const_eval/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ fn check_arms(cx: &MatchCheckCtxt,
335335
hir::MatchSource::Normal => {
336336
let mut err = struct_span_err!(cx.tcx.sess, pat.span, E0001,
337337
"unreachable pattern");
338-
err.span_label(pat.span, &format!("this is unreachable pattern"));
338+
err.span_label(pat.span, &format!("this is an unreachable pattern"));
339339
// if we had a catchall pattern, hint at that
340340
for row in &seen.0 {
341341
if pat_is_catchall(&cx.tcx.def_map.borrow(), row[0].0) {

src/test/compile-fail/issue-31221.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ fn main() {
2222
//~^ NOTE this pattern matches any value
2323
Var2 => (),
2424
//~^ ERROR unreachable pattern
25-
//~^^ NOTE this is unreachable pattern
25+
//~^^ NOTE this is an unreachable pattern
2626
};
2727
match &s {
2828
&Var1 => (),
2929
&Var3 => (),
3030
//~^ NOTE this pattern matches any value
3131
&Var2 => (),
3232
//~^ ERROR unreachable pattern
33-
//~^^ NOTE this is unreachable pattern
33+
//~^^ NOTE this is an unreachable pattern
3434
};
3535
let t = (Var1, Var1);
3636
match t {
@@ -39,7 +39,7 @@ fn main() {
3939
//~^ NOTE this pattern matches any value
4040
anything => ()
4141
//~^ ERROR unreachable pattern
42-
//~^^ NOTE this is unreachable pattern
42+
//~^^ NOTE this is an unreachable pattern
4343
};
4444
// `_` need not emit a note, it is pretty obvious already.
4545
let t = (Var1, Var1);
@@ -48,6 +48,6 @@ fn main() {
4848
_ => (),
4949
anything => ()
5050
//~^ ERROR unreachable pattern
51-
//~^^ NOTE this is unreachable pattern
51+
//~^^ NOTE this is an unreachable pattern
5252
};
5353
}

0 commit comments

Comments
 (0)