Skip to content

Commit

Permalink
Fix error message typo for pure asm without outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Aug 12, 2021
1 parent ccffcaf commit e9fb7ba
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/asm.rs
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/asm/bad-options.rs
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/asm/bad-options.stderr
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/asm/naked-functions.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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));
Expand Down

0 comments on commit e9fb7ba

Please sign in to comment.