-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Hidden traits missing implementors when documented via --document-hidden-items
#90781
Comments
@steffahn can you reproduce this on anything smaller than the standard library? |
I haven't tried it on anything else yet. I can do that tomorrow, when I'm back at a computer. I also haven't checked whether this is a regression. |
I did the full circle and wrote this: pub trait T {}
pub struct VisPub;
struct VisPriv;
#[doc(hidden)]
pub struct HidPub;
#[doc(hidden)]
struct HidPriv;
impl T for VisPub {}
impl T for VisPriv {}
impl T for HidPub {}
impl T for HidPriv {} Output is this: so hidden items won't get displayed as Implementors, although displayed as structs on the "homepage": @rustbot modify labels: -E-needs-mcve |
@hellow554 it's actually the trait that's hidden in the standard library, not the structs. Though your case not displaying the implementation is problematic, too. |
I see :) thanks for pointing it out: Rust codepub trait TPubVis {}
#[doc(hidden)]
pub trait TPubHidden {}
trait TPrivVis {}
#[doc(hidden)]
trait TPrivHidden {}
pub struct VisPub;
struct VisPriv;
#[doc(hidden)]
pub struct HidPub;
#[doc(hidden)]
struct HidPriv;
macro_rules! implement {
($trait:ident - $($struct:ident)+) => {
$(
impl $trait for $struct {}
)+
}
}
implement!(TPubVis - VisPub VisPriv HidPub HidPriv);
implement!(TPubHidden - VisPub VisPriv HidPub HidPriv);
implement!(TPrivVis - VisPub VisPriv HidPub HidPriv);
implement!(TPrivHidden - VisPub VisPriv HidPub HidPriv); |
triage: this issue has been fixed, adding a regression test for it |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#132341 (Reject raw lifetime followed by `'`, like regular lifetimes do) - rust-lang#132363 (Enforce that raw lifetimes must be valid raw identifiers) - rust-lang#132744 (add regression test for rust-lang#90781) - rust-lang#132754 (Simplify the internal API for declaring command-line options) - rust-lang#132772 (use `download-rustc="if-unchanged"` as a global default) - rust-lang#132774 (Use lld with non-LLVM backends) - rust-lang#132799 (Make `Ty::primitive_symbol` recognize `str`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132744 - lolbinarycat:test-90781, r=aDotInTheVoid add regression test for rust-lang#90781 closes rust-lang#90781
…heVoid add regression test for rust-lang#90781 closes rust-lang#90781
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#132341 (Reject raw lifetime followed by `'`, like regular lifetimes do) - rust-lang#132363 (Enforce that raw lifetimes must be valid raw identifiers) - rust-lang#132744 (add regression test for rust-lang#90781) - rust-lang#132754 (Simplify the internal API for declaring command-line options) - rust-lang#132772 (use `download-rustc="if-unchanged"` as a global default) - rust-lang#132774 (Use lld with non-LLVM backends) - rust-lang#132799 (Make `Ty::primitive_symbol` recognize `str`) r? `@ghost` `@rustbot` modify labels: rollup
You can see
--document-private-items --document-hidden-items
docs of the standard library here:https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/std/iter/trait.InPlaceIterable.html
as you can see, the implementors are missing though (which is incredibly annoying if you ever want to work on those traits). Also reproducible locally by building
RUSTDOCFLAGS='--document-private-items --document-hidden-items -A rustdoc::broken-intra-doc-links' ./x.py doc library/std --open
@rustbot label T-rustdoc
The text was updated successfully, but these errors were encountered: