Use span_suggestion
instead of span_label
This commit is contained in:
parent
e8be7971d1
commit
b00b1a4598
2 changed files with 7 additions and 7 deletions
|
@ -288,7 +288,7 @@ fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
|
|||
.sess
|
||||
.span_diagnostic
|
||||
.struct_span_err(span, &format!("the `{}` option was already provided", symbol));
|
||||
err.span_label(span, "remove this option");
|
||||
err.span_suggestion(span, "remove this option", String::new(), Applicability::Unspecified);
|
||||
err.emit();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,37 +2,37 @@ error: the `nomem` option was already provided
|
|||
--> $DIR/duplicate-options.rs:7:33
|
||||
|
|
||||
LL | asm!("", options(nomem, nomem));
|
||||
| ^^^^^ remove this option
|
||||
| ^^^^^ help: remove this option
|
||||
|
||||
error: the `att_syntax` option was already provided
|
||||
--> $DIR/duplicate-options.rs:9:38
|
||||
|
|
||||
LL | asm!("", options(att_syntax, att_syntax));
|
||||
| ^^^^^^^^^^ remove this option
|
||||
| ^^^^^^^^^^ help: remove this option
|
||||
|
||||
error: the `nostack` option was already provided
|
||||
--> $DIR/duplicate-options.rs:11:56
|
||||
|
|
||||
LL | asm!("", options(nostack, att_syntax), options(nostack));
|
||||
| ^^^^^^^ remove this option
|
||||
| ^^^^^^^ help: remove this option
|
||||
|
||||
error: the `nostack` option was already provided
|
||||
--> $DIR/duplicate-options.rs:13:35
|
||||
|
|
||||
LL | asm!("", options(nostack, nostack), options(nostack), options(nostack));
|
||||
| ^^^^^^^ remove this option
|
||||
| ^^^^^^^ help: remove this option
|
||||
|
||||
error: the `nostack` option was already provided
|
||||
--> $DIR/duplicate-options.rs:13:53
|
||||
|
|
||||
LL | asm!("", options(nostack, nostack), options(nostack), options(nostack));
|
||||
| ^^^^^^^ remove this option
|
||||
| ^^^^^^^ help: remove this option
|
||||
|
||||
error: the `nostack` option was already provided
|
||||
--> $DIR/duplicate-options.rs:13:71
|
||||
|
|
||||
LL | asm!("", options(nostack, nostack), options(nostack), options(nostack));
|
||||
| ^^^^^^^ remove this option
|
||||
| ^^^^^^^ help: remove this option
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
Loading…
Reference in a new issue