about summary refs log tree commit diff
path: root/compiler/rustc_expand/src
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-08-27 14:11:32 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2025-09-14 12:38:11 +0200
commit31c0d96cb604ead17afeb09062d10cc019de9560 (patch)
tree8d7984bce1f8bd1d3bef44e6d30df46b025a23fe /compiler/rustc_expand/src
parent2e816736efaebf1f4666efac1817bcccd78a3e52 (diff)
downloadrust-31c0d96cb604ead17afeb09062d10cc019de9560.tar.gz
rust-31c0d96cb604ead17afeb09062d10cc019de9560.zip
Move more early buffered lints to dyn lint diagnostics (2/N)
Diffstat (limited to 'compiler/rustc_expand/src')
-rw-r--r--compiler/rustc_expand/src/errors.rs8
-rw-r--r--compiler/rustc_expand/src/expand.rs2
2 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs
index a939dadaf2f..06c029482df 100644
--- a/compiler/rustc_expand/src/errors.rs
+++ b/compiler/rustc_expand/src/errors.rs
@@ -537,3 +537,11 @@ pub(crate) struct MacroArgsBadDelimSugg {
     #[suggestion_part(code = ")")]
     pub close: Span,
 }
+
+#[derive(LintDiagnostic)]
+#[diag(expand_macro_call_unused_doc_comment)]
+#[help]
+pub(crate) struct MacroCallUnusedDocComment {
+    #[label]
+    pub span: Span,
+}
diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs
index 38e057d2776..cda38cd7ae6 100644
--- a/compiler/rustc_expand/src/expand.rs
+++ b/compiler/rustc_expand/src/expand.rs
@@ -2183,7 +2183,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
                     UNUSED_DOC_COMMENTS,
                     current_span,
                     self.cx.current_expansion.lint_node_id,
-                    BuiltinLintDiag::UnusedDocComment(attr.span),
+                    crate::errors::MacroCallUnusedDocComment { span: attr.span },
                 );
             } else if rustc_attr_parsing::is_builtin_attr(attr)
                 && !AttributeParser::<Early>::is_parsed_attribute(&attr.path())