diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-03-17 09:59:45 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-03-27 22:16:34 -0400 |
| commit | 230e396a7663d933d24c3c30f556abbc1dd9405e (patch) | |
| tree | 6d9da33f54310be81b0b30d9afe47a4a96fdea9d /compiler/rustc_errors | |
| parent | de0fda9558e5b9eed94cd1e2c1599ea72115d744 (diff) | |
| download | rust-230e396a7663d933d24c3c30f556abbc1dd9405e.tar.gz rust-230e396a7663d933d24c3c30f556abbc1dd9405e.zip | |
Fix compiler docs
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index 282877d5dd1..3fc63b4e50c 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -45,6 +45,9 @@ macro_rules! forward { pub fn $n:ident(&self, $($name:ident: $ty:ty),* $(,)?) -> &Self ) => { $(#[$attrs])* + // we always document with --document-private-items + #[cfg_attr(not(bootstrap), allow(rustdoc::private_intra_doc_links))] + #[cfg_attr(bootstrap, allow(private_intra_doc_links))] #[doc = concat!("See [`Diagnostic::", stringify!($n), "()`].")] pub fn $n(&self, $($name: $ty),*) -> &Self { self.diagnostic.$n($($name),*); @@ -59,6 +62,9 @@ macro_rules! forward { ) => { $(#[$attrs])* #[doc = concat!("See [`Diagnostic::", stringify!($n), "()`].")] + // we always document with --document-private-items + #[cfg_attr(not(bootstrap), allow(rustdoc::private_intra_doc_links))] + #[cfg_attr(bootstrap, allow(private_intra_doc_links))] pub fn $n(&mut self, $($name: $ty),*) -> &mut Self { self.0.diagnostic.$n($($name),*); self @@ -76,6 +82,9 @@ macro_rules! forward { ) => { $(#[$attrs])* #[doc = concat!("See [`Diagnostic::", stringify!($n), "()`].")] + // we always document with --document-private-items + #[cfg_attr(not(bootstrap), allow(rustdoc::private_intra_doc_links))] + #[cfg_attr(bootstrap, allow(private_intra_doc_links))] pub fn $n<$($generic: $bound),*>(&mut self, $($name: $ty),*) -> &mut Self { self.0.diagnostic.$n($($name),*); self |
