about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2021-07-29 11:15:50 +0200
committerAmanieu d'Antras <amanieu@gmail.com>2021-08-12 12:42:58 +0100
commite9fb7bada1dc2d288ef44852b0e1986dbcfaaab5 (patch)
tree9e073cc1f3f27011f021cc8d17f52b4ee48427ff
parentccffcafd55e58f769d4b0efc0064bf65e76998e4 (diff)
downloadrust-e9fb7bada1dc2d288ef44852b0e1986dbcfaaab5.tar.gz
rust-e9fb7bada1dc2d288ef44852b0e1986dbcfaaab5.zip
Fix error message typo for pure asm without outputs
-rw-r--r--compiler/rustc_builtin_macros/src/asm.rs2
-rw-r--r--src/test/ui/asm/bad-options.rs4
-rw-r--r--src/test/ui/asm/bad-options.stderr4
-rw-r--r--src/test/ui/asm/naked-functions.rs2
-rw-r--r--src/test/ui/asm/naked-functions.stderr2
5 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_builtin_macros/src/asm.rs b/compiler/rustc_builtin_macros/src/asm.rs
index ff13f0d4e42..df3aed3bca2 100644
--- a/compiler/rustc_builtin_macros/src/asm.rs
+++ b/compiler/rustc_builtin_macros/src/asm.rs
@@ -273,7 +273,7 @@ fn parse_args<'a>(
     if args.options.contains(ast::InlineAsmOptions::PURE) && !have_real_output {
         ecx.struct_span_err(
             args.options_spans.clone(),
-            "asm with `pure` option must have at least one output",
+            "asm with the `pure` option must have at least one output",
         )
         .emit();
     }
diff --git a/src/test/ui/asm/bad-options.rs b/src/test/ui/asm/bad-options.rs
index 923d65bfd96..1f5eb4afbd3 100644
--- a/src/test/ui/asm/bad-options.rs
+++ b/src/test/ui/asm/bad-options.rs
@@ -9,9 +9,9 @@ fn main() {
         //~^ ERROR the `nomem` and `readonly` options are mutually exclusive
         asm!("", options(pure, nomem, noreturn));
         //~^ ERROR the `pure` and `noreturn` options are mutually exclusive
-        //~^^ ERROR asm with `pure` option must have at least one output
+        //~^^ ERROR asm with the `pure` option must have at least one output
         asm!("{}", in(reg) foo, options(pure, nomem));
-        //~^ ERROR asm with `pure` option must have at least one output
+        //~^ ERROR asm with the `pure` option must have at least one output
         asm!("{}", out(reg) foo, options(noreturn));
         //~^ ERROR asm outputs are not allowed with the `noreturn` option
     }
diff --git a/src/test/ui/asm/bad-options.stderr b/src/test/ui/asm/bad-options.stderr
index 9039483be4b..20f00c13c75 100644
--- a/src/test/ui/asm/bad-options.stderr
+++ b/src/test/ui/asm/bad-options.stderr
@@ -10,13 +10,13 @@ error: the `pure` and `noreturn` options are mutually exclusive
 LL |         asm!("", options(pure, nomem, noreturn));
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: asm with `pure` option must have at least one output
+error: asm with the `pure` option must have at least one output
   --> $DIR/bad-options.rs:10:18
    |
 LL |         asm!("", options(pure, nomem, noreturn));
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: asm with `pure` option must have at least one output
+error: asm with the `pure` option must have at least one output
   --> $DIR/bad-options.rs:13:33
    |
 LL |         asm!("{}", in(reg) foo, options(pure, nomem));
diff --git a/src/test/ui/asm/naked-functions.rs b/src/test/ui/asm/naked-functions.rs
index 900f4443a1f..fbf187040f9 100644
--- a/src/test/ui/asm/naked-functions.rs
+++ b/src/test/ui/asm/naked-functions.rs
@@ -124,7 +124,7 @@ unsafe extern "C" fn invalid_options() {
 #[naked]
 unsafe extern "C" fn invalid_options_continued() {
     asm!("", options(readonly, nostack), options(pure));
-    //~^ ERROR asm with `pure` option must have at least one output
+    //~^ ERROR asm with the `pure` option must have at least one output
     //~| WARN asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
     //~| WARN this was previously accepted
     //~| WARN asm in naked functions must use `noreturn` option
diff --git a/src/test/ui/asm/naked-functions.stderr b/src/test/ui/asm/naked-functions.stderr
index 231a6239cbd..16d3472c28a 100644
--- a/src/test/ui/asm/naked-functions.stderr
+++ b/src/test/ui/asm/naked-functions.stderr
@@ -1,4 +1,4 @@
-error: asm with `pure` option must have at least one output
+error: asm with the `pure` option must have at least one output
   --> $DIR/naked-functions.rs:126:14
    |
 LL |     asm!("", options(readonly, nostack), options(pure));