]> git.lizzy.rs Git - rust.git/commitdiff
Use `span_suggestion` instead of `span_label`
authorCamelid <camelidcamel@gmail.com>
Tue, 16 Jun 2020 18:54:12 +0000 (11:54 -0700)
committerCamelid <camelidcamel@gmail.com>
Sat, 20 Jun 2020 18:12:43 +0000 (11:12 -0700)
src/librustc_builtin_macros/asm.rs
src/test/ui/asm/duplicate-options.stderr

index db4fae606ad3461b1b3b0821f46667c21cafdb9e..675cc904a9f04ac5d8179613c81ebec684de25ee 100644 (file)
@@ -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();
 }
 
index 6339ae9db8105e8e174451c1b1ff9d6dec7ae6d7..356e27df19e58ceddc2945b8eed7ff9d1afcd2cb 100644 (file)
@@ -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