-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: how does #[doc(hidden)]
interact with --document-private-items
?
#46380
Comments
This is related to rust-lang/rust#46380 upstream.
So it seems like there's two things going on here:
|
To fix the second note in my previous comment, you'd need to unpack if let Some(generics) = imp.trait_.and_then(|t| t.generics()) {
for typaram in generics {
if let Some(did) = typaram.def_id() {
if did.is_local() && !self.retained.contains(did) {
return None;
}
}
}
} Right after that linked block. This is technically not part of the issue (at least it sounds like the issue was more about |
…reavus Hide private trait type params and show hidden items with document-private As discussed in rust-lang#46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc. The second commit removes the trait implementation from the docs if the trait's parameter is private.
Fixed in #46412 |
This is related to rust-lang/rust#46380 upstream.
I have types
Public
(which is exported) andPrivate
(which isn't) and animpl Add<Private> for Public
. I would like theimpl Add<Private> for Public
to appear in the Rustdoc output only when using--document-private-items
.As far as I can tell, the
impl Add<Private> for Public
appears in the normal rustdoc output unless it has a#[doc(hidden)]
attribute. But this prevents the impl from appearing with--document-private-items
.Is
--document-private-items
supposed to override#[doc(hidden)]
? Is there another way to hideimpl Add<Private> for Public
from the public rustdoc output?The text was updated successfully, but these errors were encountered: