From 75e80358d20d41ef148da32a1a5a4e29282181fc Mon Sep 17 00:00:00 2001 From: Klim Tsoutsman Date: Sat, 7 Aug 2021 13:46:58 +1000 Subject: [PATCH] Change proc_macro::Diagnostics docs Add links Fit 100-character limit --- library/proc_macro/src/diagnostic.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/library/proc_macro/src/diagnostic.rs b/library/proc_macro/src/diagnostic.rs index 7495468a05b6..6e46dc0367d0 100644 --- a/library/proc_macro/src/diagnostic.rs +++ b/library/proc_macro/src/diagnostic.rs @@ -56,10 +56,9 @@ pub struct Diagnostic { macro_rules! diagnostic_child_methods { ($spanned:ident, $regular:ident, $level:expr) => { - /// Adds a new child diagnostic message to `self` with the level - /// identified by this method's name with the given `spans` and - /// `message`. #[unstable(feature = "proc_macro_diagnostic", issue = "54140")] + #[doc = concat!("Adds a new child diagnostics message to `self` with the [`", + stringify!($level), "`] level, and the given `spans` and `message`.")] pub fn $spanned(mut self, spans: S, message: T) -> Diagnostic where S: MultiSpan, @@ -69,9 +68,9 @@ pub fn $spanned(mut self, spans: S, message: T) -> Diagnostic self } - /// Adds a new child diagnostic message to `self` with the level - /// identified by this method's name with the given `message`. #[unstable(feature = "proc_macro_diagnostic", issue = "54140")] + #[doc = concat!("Adds a new child diagnostic message to `self` with the [`", + stringify!($level), "`] level, and the given `message`.")] pub fn $regular>(mut self, message: T) -> Diagnostic { self.children.push(Diagnostic::new($level, message)); self