Skip to content

Commit d96ff69

Browse files
authored
Rollup merge of #146559 - Jules-Bertholet:fix-typo, r=nnethercote
Fix typo in error message
2 parents 5d9880a + 927c4c0 commit d96ff69

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

compiler/rustc_middle/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ middle_failed_writing_file =
8484
# Note: We only mention patterns here since the error can only occur with references, and those
8585
# are forbidden in const generics.
8686
middle_invalid_const_in_valtree = constant {$global_const_id} cannot be used as pattern
87-
.note = constants that reference mutable or external memory cannot be used as pattern
87+
.note = constants that reference mutable or external memory cannot be used as patterns
8888
8989
middle_layout_cycle =
9090
a cycle occurred during layout computation

tests/ui/consts/const_refs_to_static_fail.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ error: constant BAD_PATTERN cannot be used as pattern
1616
LL | BAD_PATTERN => {},
1717
| ^^^^^^^^^^^
1818
|
19-
= note: constants that reference mutable or external memory cannot be used as pattern
19+
= note: constants that reference mutable or external memory cannot be used as patterns
2020

2121
error: aborting due to 3 previous errors
2222

tests/ui/consts/const_refs_to_static_fail_invalid.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ error: constant extern_::C cannot be used as pattern
1515
LL | C => {}
1616
| ^
1717
|
18-
= note: constants that reference mutable or external memory cannot be used as pattern
18+
= note: constants that reference mutable or external memory cannot be used as patterns
1919

2020
error: constant mutable::C cannot be used as pattern
2121
--> $DIR/const_refs_to_static_fail_invalid.rs:42:9
2222
|
2323
LL | C => {}
2424
| ^
2525
|
26-
= note: constants that reference mutable or external memory cannot be used as pattern
26+
= note: constants that reference mutable or external memory cannot be used as patterns
2727

2828
error: aborting due to 3 previous errors
2929

tests/ui/consts/miri_unleashed/const_refers_to_static.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ error: constant REF_INTERIOR_MUT cannot be used as pattern
2222
LL | REF_INTERIOR_MUT => {},
2323
| ^^^^^^^^^^^^^^^^
2424
|
25-
= note: constants that reference mutable or external memory cannot be used as pattern
25+
= note: constants that reference mutable or external memory cannot be used as patterns
2626

2727
warning: skipping const checks
2828
|

tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ error: constant SLICE_MUT cannot be used as pattern
1010
LL | SLICE_MUT => true,
1111
| ^^^^^^^^^
1212
|
13-
= note: constants that reference mutable or external memory cannot be used as pattern
13+
= note: constants that reference mutable or external memory cannot be used as patterns
1414

1515
error: constant U8_MUT cannot be used as pattern
1616
--> $DIR/const_refers_to_static_cross_crate.rs:44:9
1717
|
1818
LL | U8_MUT => true,
1919
| ^^^^^^
2020
|
21-
= note: constants that reference mutable or external memory cannot be used as pattern
21+
= note: constants that reference mutable or external memory cannot be used as patterns
2222

2323
error: constant U8_MUT2 cannot be used as pattern
2424
--> $DIR/const_refers_to_static_cross_crate.rs:53:9
2525
|
2626
LL | U8_MUT2 => true,
2727
| ^^^^^^^
2828
|
29-
= note: constants that reference mutable or external memory cannot be used as pattern
29+
= note: constants that reference mutable or external memory cannot be used as patterns
3030

3131
error: aborting due to 4 previous errors
3232

0 commit comments

Comments
 (0)