Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b00b1a4

Browse files
committed
Use span_suggestion instead of span_label
1 parent e8be797 commit b00b1a4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/librustc_builtin_macros/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
288288
.sess
289289
.span_diagnostic
290290
.struct_span_err(span, &format!("the `{}` option was already provided", symbol));
291-
err.span_label(span, "remove this option");
291+
err.span_suggestion(span, "remove this option", String::new(), Applicability::Unspecified);
292292
err.emit();
293293
}
294294

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@ error: the `nomem` option was already provided
22
--> $DIR/duplicate-options.rs:7:33
33
|
44
LL | asm!("", options(nomem, nomem));
5-
| ^^^^^ remove this option
5+
| ^^^^^ help: remove this option
66

77
error: the `att_syntax` option was already provided
88
--> $DIR/duplicate-options.rs:9:38
99
|
1010
LL | asm!("", options(att_syntax, att_syntax));
11-
| ^^^^^^^^^^ remove this option
11+
| ^^^^^^^^^^ help: remove this option
1212

1313
error: the `nostack` option was already provided
1414
--> $DIR/duplicate-options.rs:11:56
1515
|
1616
LL | asm!("", options(nostack, att_syntax), options(nostack));
17-
| ^^^^^^^ remove this option
17+
| ^^^^^^^ help: remove this option
1818

1919
error: the `nostack` option was already provided
2020
--> $DIR/duplicate-options.rs:13:35
2121
|
2222
LL | asm!("", options(nostack, nostack), options(nostack), options(nostack));
23-
| ^^^^^^^ remove this option
23+
| ^^^^^^^ help: remove this option
2424

2525
error: the `nostack` option was already provided
2626
--> $DIR/duplicate-options.rs:13:53
2727
|
2828
LL | asm!("", options(nostack, nostack), options(nostack), options(nostack));
29-
| ^^^^^^^ remove this option
29+
| ^^^^^^^ help: remove this option
3030

3131
error: the `nostack` option was already provided
3232
--> $DIR/duplicate-options.rs:13:71
3333
|
3434
LL | asm!("", options(nostack, nostack), options(nostack), options(nostack));
35-
| ^^^^^^^ remove this option
35+
| ^^^^^^^ help: remove this option
3636

3737
error: aborting due to 6 previous errors
3838

0 commit comments

Comments
 (0)