Skip to content

Commit f793b69

Browse files
committed
Reword purpose description of noreturn in naked function
1 parent b657cb5 commit f793b69

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_passes/src/naked_functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl<'tcx> CheckInlineAssembly<'tcx> {
289289
.span_suggestion(
290290
last_span,
291291
"consider specifying that the asm block is responsible \
292-
for returning, if desired",
292+
for returning from the function",
293293
String::from(", options(noreturn)"),
294294
Applicability::MachineApplicable,
295295
)

src/test/ui/asm/naked-functions.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ LL | | sym G,
9898
LL | | );
9999
| |_____^
100100
|
101-
help: consider specifying that the asm block is responsible for returning, if desired
101+
help: consider specifying that the asm block is responsible for returning from the function
102102
|
103103
LL | sym G, options(noreturn),
104104
| +++++++++++++++++++
@@ -137,7 +137,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
137137
LL | asm!("");
138138
| ^^^^^^^^
139139
|
140-
help: consider specifying that the asm block is responsible for returning, if desired
140+
help: consider specifying that the asm block is responsible for returning from the function
141141
|
142142
LL | asm!("", options(noreturn));
143143
| +++++++++++++++++++
@@ -148,7 +148,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
148148
LL | asm!("");
149149
| ^^^^^^^^
150150
|
151-
help: consider specifying that the asm block is responsible for returning, if desired
151+
help: consider specifying that the asm block is responsible for returning from the function
152152
|
153153
LL | asm!("", options(noreturn));
154154
| +++++++++++++++++++
@@ -159,7 +159,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
159159
LL | asm!("");
160160
| ^^^^^^^^
161161
|
162-
help: consider specifying that the asm block is responsible for returning, if desired
162+
help: consider specifying that the asm block is responsible for returning from the function
163163
|
164164
LL | asm!("", options(noreturn));
165165
| +++++++++++++++++++
@@ -219,7 +219,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
219219
LL | asm!("", options(readonly, nostack), options(pure));
220220
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221221
|
222-
help: consider specifying that the asm block is responsible for returning, if desired
222+
help: consider specifying that the asm block is responsible for returning from the function
223223
|
224224
LL | asm!("", options(noreturn), options(readonly, nostack), options(pure));
225225
| +++++++++++++++++++

0 commit comments

Comments
 (0)