diff --git a/compiler/rustc_builtin_macros/src/asm.rs b/compiler/rustc_builtin_macros/src/asm.rs index ff13f0d4e4207..df3aed3bca2ef 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 923d65bfd96ed..1f5eb4afbd317 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 9039483be4bf9..20f00c13c7556 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 900f4443a1fd6..fbf187040f96c 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 231a6239cbde5..16d3472c28ab0 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));