about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPragmaTwice <twice.mliu@gmail.com>2022-08-17 22:08:06 +0800
committerPragmaTwice <twice.mliu@gmail.com>2022-08-17 22:08:06 +0800
commit9efe97951165a144c17ab08c8842f4f1cf23b4da (patch)
tree646b8c2d822d85dda9b259e80014688fce69836c
parentb704843c4438387a66111b3464bb3987c45ce294 (diff)
downloadrust-9efe97951165a144c17ab08c8842f4f1cf23b4da.tar.gz
rust-9efe97951165a144c17ab08c8842f4f1cf23b4da.zip
remove #[primary_span]
-rw-r--r--compiler/rustc_typeck/src/errors.rs2
-rw-r--r--src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr6
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_typeck/src/errors.rs b/compiler/rustc_typeck/src/errors.rs
index a33d88dfee0..76599721e58 100644
--- a/compiler/rustc_typeck/src/errors.rs
+++ b/compiler/rustc_typeck/src/errors.rs
@@ -328,7 +328,6 @@ pub struct SubstsOnOverriddenImpl {
 #[derive(LintDiagnostic)]
 #[lint(typeck::unused_extern_crate)]
 pub struct UnusedExternCrate {
-    #[primary_span]
     #[suggestion(applicability = "machine-applicable", code = "")]
     pub span: Span,
 }
@@ -336,7 +335,6 @@ pub struct UnusedExternCrate {
 #[derive(LintDiagnostic)]
 #[lint(typeck::extern_crate_not_idiomatic)]
 pub struct ExternCrateNotIdiomatic {
-    #[primary_span]
     #[suggestion_short(applicability = "machine-applicable", code = "{suggestion_code}")]
     pub span: Span,
     pub msg_code: String,
diff --git a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
index 01bd924a415..2ef97e7f20e 100644
--- a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
+++ b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
@@ -1,9 +1,11 @@
 error: unused extern crate
-  --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:11:1
+  --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:12:1
    |
 LL | / #[cfg(blandiloquence)]
 LL | | extern crate edition_lint_paths;
-   | |________________________________^ help: remove it
+   | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
+   | |________________________________|
+   |                                  help: remove it
    |
 note: the lint level is defined here
   --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:6:9