Fix error message typo for pure asm without outputs
This commit is contained in:
parent
ccffcafd55
commit
e9fb7bada1
5 changed files with 7 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue