@@ -56,10 +56,9 @@ pub struct Diagnostic {
5656
5757macro_rules! diagnostic_child_methods {
5858 ( $spanned: ident, $regular: ident, $level: expr) => {
59- /// Adds a new child diagnostic message to `self` with the level
60- /// identified by this method's name with the given `spans` and
61- /// `message`.
6259 #[ unstable( feature = "proc_macro_diagnostic" , issue = "54140" ) ]
60+ #[ doc = concat!( "Adds a new child diagnostics message to `self` with the [`" ,
61+ stringify!( $level) , "`] level, and the given `spans` and `message`." ) ]
6362 pub fn $spanned<S , T >( mut self , spans: S , message: T ) -> Diagnostic
6463 where
6564 S : MultiSpan ,
@@ -69,9 +68,9 @@ macro_rules! diagnostic_child_methods {
6968 self
7069 }
7170
72- /// Adds a new child diagnostic message to `self` with the level
73- /// identified by this method's name with the given `message`.
7471 #[ unstable( feature = "proc_macro_diagnostic" , issue = "54140" ) ]
72+ #[ doc = concat!( "Adds a new child diagnostic message to `self` with the [`" ,
73+ stringify!( $level) , "`] level, and the given `message`." ) ]
7574 pub fn $regular<T : Into <String >>( mut self , message: T ) -> Diagnostic {
7675 self . children. push( Diagnostic :: new( $level, message) ) ;
7776 self
0 commit comments