Skip to content

Commit 75e8035

Browse files
committed
Change proc_macro::Diagnostics docs
Add links Fit 100-character limit
1 parent db3cb43 commit 75e8035

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

library/proc_macro/src/diagnostic.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ pub struct Diagnostic {
5656

5757
macro_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

Comments
 (0)