-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
cross-crate #[doc(hidden)]
is ignored when listing trait implementations
#86448
Comments
I expect the fix is to check for rust/src/librustdoc/clean/inline.rs Line 370 in e82b650
|
@rustbot claim |
cc @jyn514 I checked for doc(hidden) like this: if let Some(did) = for_.def_id() {
if cx.tcx.get_attrs(did).lists(sym::doc).has_word(sym::hidden) {
return
}
} But it doesn't seem to work, as my test would fail. I also tried using the same way to check for |
You can look at how the rust/src/librustdoc/passes/stripper.rs Lines 142 to 143 in 0aa2844
|
@danielhenrymantilla am I right in understanding this only happens for cross-crate traits, and impls for hidden traits in the same crate are still hidden? In other words, #86513 just makes the cross-crate case consistent? |
I believe so, yes: the |
…=danielhenrymantilla Rustdoc: Do not list impl when trait has doc(hidden) Fixes rust-lang#86448.
Context
https://users.rust-lang.org/t/hidden-trait-implementation-in-online-docs/61256/4
Repro
Last line yields several occurrences of
HiddenType
in the generated.html
file.Expected behavior
No occurrences of
HiddenType
anywhere since it was#[doc(hidden)]
Playground
@rustbot label C-bug T-rustdoc
cc @GuillaumeGomez
The text was updated successfully, but these errors were encountered: