@@ -56,10 +56,9 @@ pub struct Diagnostic {
56
56
57
57
macro_rules! diagnostic_child_methods {
58
58
( $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`.
62
59
#[ 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`." ) ]
63
62
pub fn $spanned<S , T >( mut self , spans: S , message: T ) -> Diagnostic
64
63
where
65
64
S : MultiSpan ,
@@ -69,9 +68,9 @@ macro_rules! diagnostic_child_methods {
69
68
self
70
69
}
71
70
72
- /// Adds a new child diagnostic message to `self` with the level
73
- /// identified by this method's name with the given `message`.
74
71
#[ 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`." ) ]
75
74
pub fn $regular<T : Into <String >>( mut self , message: T ) -> Diagnostic {
76
75
self . children. push( Diagnostic :: new( $level, message) ) ;
77
76
self
0 commit comments