Skip to content

Commit f9e1963

Browse files
committed
fix typo in error message
1 parent 3b7a14c commit f9e1963

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_ast_passes/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ast_passes_abi_custom_safe_foreign_function =
99
1010
ast_passes_abi_custom_safe_function =
1111
functions with the `"custom"` ABI must be unsafe
12-
.suggestion = add the `unsafe` keyword to function definition
12+
.suggestion = add the `unsafe` keyword to this definition
1313
1414
ast_passes_assoc_const_without_body =
1515
associated constant in `impl` without body

tests/ui/abi/bad-custom.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: functions with the `"custom"` ABI must be unsafe
44
LL | extern "custom" fn must_be_unsafe(a: i64) -> i64 {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
help: add the `unsafe` keyword to function definition
7+
help: add the `unsafe` keyword to this definition
88
|
99
LL | unsafe extern "custom" fn must_be_unsafe(a: i64) -> i64 {
1010
| ++++++
@@ -93,7 +93,7 @@ error: functions with the `"custom"` ABI must be unsafe
9393
LL | extern "custom" fn negate(a: i64) -> i64;
9494
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9595
|
96-
help: add the `unsafe` keyword to function definition
96+
help: add the `unsafe` keyword to this definition
9797
|
9898
LL | unsafe extern "custom" fn negate(a: i64) -> i64;
9999
| ++++++
@@ -117,7 +117,7 @@ error: functions with the `"custom"` ABI must be unsafe
117117
LL | extern "custom" fn negate(a: i64) -> i64 {
118118
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119119
|
120-
help: add the `unsafe` keyword to function definition
120+
help: add the `unsafe` keyword to this definition
121121
|
122122
LL | unsafe extern "custom" fn negate(a: i64) -> i64 {
123123
| ++++++

tests/ui/feature-gates/feature-gate-abi-custom.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: functions with the `"custom"` ABI must be unsafe
44
LL | extern "custom" fn m7();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
help: add the `unsafe` keyword to function definition
7+
help: add the `unsafe` keyword to this definition
88
|
99
LL | unsafe extern "custom" fn m7();
1010
| ++++++
@@ -15,7 +15,7 @@ error: functions with the `"custom"` ABI must be unsafe
1515
LL | extern "custom" fn dm7() {
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^
1717
|
18-
help: add the `unsafe` keyword to function definition
18+
help: add the `unsafe` keyword to this definition
1919
|
2020
LL | unsafe extern "custom" fn dm7() {
2121
| ++++++
@@ -26,7 +26,7 @@ error: functions with the `"custom"` ABI must be unsafe
2626
LL | extern "custom" fn m7() {
2727
| ^^^^^^^^^^^^^^^^^^^^^^^
2828
|
29-
help: add the `unsafe` keyword to function definition
29+
help: add the `unsafe` keyword to this definition
3030
|
3131
LL | unsafe extern "custom" fn m7() {
3232
| ++++++
@@ -37,7 +37,7 @@ error: functions with the `"custom"` ABI must be unsafe
3737
LL | extern "custom" fn im7() {
3838
| ^^^^^^^^^^^^^^^^^^^^^^^^
3939
|
40-
help: add the `unsafe` keyword to function definition
40+
help: add the `unsafe` keyword to this definition
4141
|
4242
LL | unsafe extern "custom" fn im7() {
4343
| ++++++

0 commit comments

Comments
 (0)