about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_passes/src/naked_functions.rs2
-rw-r--r--src/test/ui/asm/naked-functions.stderr10
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_passes/src/naked_functions.rs b/compiler/rustc_passes/src/naked_functions.rs
index 30db0cec080..02f6b406059 100644
--- a/compiler/rustc_passes/src/naked_functions.rs
+++ b/compiler/rustc_passes/src/naked_functions.rs
@@ -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,
             )
diff --git a/src/test/ui/asm/naked-functions.stderr b/src/test/ui/asm/naked-functions.stderr
index edaecb78b2c..35dc9cca33b 100644
--- a/src/test/ui/asm/naked-functions.stderr
+++ b/src/test/ui/asm/naked-functions.stderr
@@ -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),
    |               +++++++++++++++++++
@@ -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));
    |            +++++++++++++++++++
@@ -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));
    |            +++++++++++++++++++
@@ -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));
    |            +++++++++++++++++++
@@ -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));
    |            +++++++++++++++++++