about summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing/src/session_diagnostics.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-08-11 17:02:32 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-08-11 17:02:32 +0000
commit32ee26c625e8fbb7a3aa56788cbb352f04491964 (patch)
tree7aa1e7f03f7f47ce16b3405859d41e35f32bd945 /compiler/rustc_attr_parsing/src/session_diagnostics.rs
parent413ca5d9f0868f5d91a8b773ce60d70d5205c3f3 (diff)
downloadrust-32ee26c625e8fbb7a3aa56788cbb352f04491964.tar.gz
rust-32ee26c625e8fbb7a3aa56788cbb352f04491964.zip
Add more docs to templates for attrs with incorrect arguments
Diffstat (limited to 'compiler/rustc_attr_parsing/src/session_diagnostics.rs')
-rw-r--r--compiler/rustc_attr_parsing/src/session_diagnostics.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_attr_parsing/src/session_diagnostics.rs b/compiler/rustc_attr_parsing/src/session_diagnostics.rs
index e4aae13f790..41179844152 100644
--- a/compiler/rustc_attr_parsing/src/session_diagnostics.rs
+++ b/compiler/rustc_attr_parsing/src/session_diagnostics.rs
@@ -691,6 +691,9 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AttributeParseError {
             }
         }
 
+        if let Some(link) = self.template.docs {
+            diag.note(format!("for more information, visit <{link}>"));
+        }
         let suggestions = self.template.suggestions(false, &name);
         diag.span_suggestions(
             self.attr_span,