about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-13 07:27:12 +0000
committerbors <bors@rust-lang.org>2025-08-13 07:27:12 +0000
commit1c9952f4dd6e0947ee91f07130c03813a088a894 (patch)
tree76ab8fffd7bb2141f450a0d7a7bdde95610cf93c /compiler/rustc_lint/src
parentb1b26b834d85e84b46aa8f8f3ce210a1627aa85f (diff)
parent8cb78fe3b63ab1f83d084411cb1f768ce9443a3d (diff)
downloadrust-1c9952f4dd6e0947ee91f07130c03813a088a894.tar.gz
rust-1c9952f4dd6e0947ee91f07130c03813a088a894.zip
Auto merge of #145334 - Kobzol:rollup-fs5a133, r=Kobzol
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#143467 (Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char`)
 - rust-lang/rust#144519 (Constify `SystemTime` methods)
 - rust-lang/rust#144642 (editorconfig: don't trim trailing whitespace in tests)
 - rust-lang/rust#144870 (Stabilize `path_file_prefix` feature)
 - rust-lang/rust#145269 (Deprecate RUST_TEST_* env variables)
 - rust-lang/rust#145274 (Remove unused `#[must_use]`)
 - rust-lang/rust#145289 (chore(ci): upgrade checkout to v5)
 - rust-lang/rust#145303 (Docs: Link to payload_as_str() from payload().)
 - rust-lang/rust#145308 (Adjust documentation of `dangling`)
 - rust-lang/rust#145320 (Allow cross-compiling the Cranelift dist component)
 - rust-lang/rust#145325 (Add `cast_init` and `cast_uninit` methods for pointers)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/early/diagnostics.rs10
-rw-r--r--compiler/rustc_lint/src/lints.rs3
2 files changed, 10 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/early/diagnostics.rs b/compiler/rustc_lint/src/early/diagnostics.rs
index 1e4bc79ce70..678d3d1f8ed 100644
--- a/compiler/rustc_lint/src/early/diagnostics.rs
+++ b/compiler/rustc_lint/src/early/diagnostics.rs
@@ -205,8 +205,14 @@ pub fn decorate_builtin_lint(
             }
             .decorate_lint(diag);
         }
-        BuiltinLintDiag::UnusedBuiltinAttribute { attr_name, macro_name, invoc_span } => {
-            lints::UnusedBuiltinAttribute { invoc_span, attr_name, macro_name }.decorate_lint(diag);
+        BuiltinLintDiag::UnusedBuiltinAttribute {
+            attr_name,
+            macro_name,
+            invoc_span,
+            attr_span,
+        } => {
+            lints::UnusedBuiltinAttribute { invoc_span, attr_name, macro_name, attr_span }
+                .decorate_lint(diag);
         }
         BuiltinLintDiag::TrailingMacro(is_trailing, name) => {
             lints::TrailingMacro { is_trailing, name }.decorate_lint(diag);
diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs
index ba0112c8ac6..a6d59af6900 100644
--- a/compiler/rustc_lint/src/lints.rs
+++ b/compiler/rustc_lint/src/lints.rs
@@ -2938,9 +2938,10 @@ pub(crate) struct RawPrefix {
 pub(crate) struct UnusedBuiltinAttribute {
     #[note]
     pub invoc_span: Span,
-
     pub attr_name: Symbol,
     pub macro_name: String,
+    #[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
+    pub attr_span: Span,
 }
 
 #[derive(LintDiagnostic)]