Skip to content

Commit e9fb7ba

Browse files
committed
Fix error message typo for pure asm without outputs
1 parent ccffcaf commit e9fb7ba

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

compiler/rustc_builtin_macros/src/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn parse_args<'a>(
273273
if args.options.contains(ast::InlineAsmOptions::PURE) && !have_real_output {
274274
ecx.struct_span_err(
275275
args.options_spans.clone(),
276-
"asm with `pure` option must have at least one output",
276+
"asm with the `pure` option must have at least one output",
277277
)
278278
.emit();
279279
}

src/test/ui/asm/bad-options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ fn main() {
99
//~^ ERROR the `nomem` and `readonly` options are mutually exclusive
1010
asm!("", options(pure, nomem, noreturn));
1111
//~^ ERROR the `pure` and `noreturn` options are mutually exclusive
12-
//~^^ ERROR asm with `pure` option must have at least one output
12+
//~^^ ERROR asm with the `pure` option must have at least one output
1313
asm!("{}", in(reg) foo, options(pure, nomem));
14-
//~^ ERROR asm with `pure` option must have at least one output
14+
//~^ ERROR asm with the `pure` option must have at least one output
1515
asm!("{}", out(reg) foo, options(noreturn));
1616
//~^ ERROR asm outputs are not allowed with the `noreturn` option
1717
}

src/test/ui/asm/bad-options.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ error: the `pure` and `noreturn` options are mutually exclusive
1010
LL | asm!("", options(pure, nomem, noreturn));
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

13-
error: asm with `pure` option must have at least one output
13+
error: asm with the `pure` option must have at least one output
1414
--> $DIR/bad-options.rs:10:18
1515
|
1616
LL | asm!("", options(pure, nomem, noreturn));
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

19-
error: asm with `pure` option must have at least one output
19+
error: asm with the `pure` option must have at least one output
2020
--> $DIR/bad-options.rs:13:33
2121
|
2222
LL | asm!("{}", in(reg) foo, options(pure, nomem));

src/test/ui/asm/naked-functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ unsafe extern "C" fn invalid_options() {
124124
#[naked]
125125
unsafe extern "C" fn invalid_options_continued() {
126126
asm!("", options(readonly, nostack), options(pure));
127-
//~^ ERROR asm with `pure` option must have at least one output
127+
//~^ ERROR asm with the `pure` option must have at least one output
128128
//~| WARN asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
129129
//~| WARN this was previously accepted
130130
//~| WARN asm in naked functions must use `noreturn` option

src/test/ui/asm/naked-functions.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: asm with `pure` option must have at least one output
1+
error: asm with the `pure` option must have at least one output
22
--> $DIR/naked-functions.rs:126:14
33
|
44
LL | asm!("", options(readonly, nostack), options(pure));

0 commit comments

Comments
 (0)