Skip to content

Commit

Permalink
Reword purpose description of noreturn in naked function
Browse files Browse the repository at this point in the history
  • Loading branch information
jam1garner committed Apr 1, 2022
1 parent b657cb5 commit f793b69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/naked_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl<'tcx> CheckInlineAssembly<'tcx> {
.span_suggestion(
last_span,
"consider specifying that the asm block is responsible \
for returning, if desired",
for returning from the function",
String::from(", options(noreturn)"),
Applicability::MachineApplicable,
)
Expand Down
10 changes: 5 additions & 5 deletions src/test/ui/asm/naked-functions.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ LL | | sym G,
LL | | );
| |_____^
|
help: consider specifying that the asm block is responsible for returning, if desired
help: consider specifying that the asm block is responsible for returning from the function
|
LL | sym G, options(noreturn),
| +++++++++++++++++++
Expand Down Expand Up @@ -137,7 +137,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
LL | asm!("");
| ^^^^^^^^
|
help: consider specifying that the asm block is responsible for returning, if desired
help: consider specifying that the asm block is responsible for returning from the function
|
LL | asm!("", options(noreturn));
| +++++++++++++++++++
Expand All @@ -148,7 +148,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
LL | asm!("");
| ^^^^^^^^
|
help: consider specifying that the asm block is responsible for returning, if desired
help: consider specifying that the asm block is responsible for returning from the function
|
LL | asm!("", options(noreturn));
| +++++++++++++++++++
Expand All @@ -159,7 +159,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
LL | asm!("");
| ^^^^^^^^
|
help: consider specifying that the asm block is responsible for returning, if desired
help: consider specifying that the asm block is responsible for returning from the function
|
LL | asm!("", options(noreturn));
| +++++++++++++++++++
Expand Down Expand Up @@ -219,7 +219,7 @@ error[E0787]: asm in naked functions must use `noreturn` option
LL | asm!("", options(readonly, nostack), options(pure));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider specifying that the asm block is responsible for returning, if desired
help: consider specifying that the asm block is responsible for returning from the function
|
LL | asm!("", options(noreturn), options(readonly, nostack), options(pure));
| +++++++++++++++++++
Expand Down

0 comments on commit f793b69

Please sign in to comment.