You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc: Trait implementations aren't listed in generated docs under some circumstances #36922
Serde's Deserialize and Serialize traits don't show up in the "Trait Implementations" section for types that use custom derive through Macros 1.1 or through Syntex. Alex Crichton also notes that rustdoc does not display Copy in the "Trait Implementations" section with the following code:
@alexcrichton Ugh, the way rustdoc scans a crate is dubious at best. I've been having to patch up rustdoc for various typesystem/metadata changes, and it's really sad how items from extern crates are second-class, but at the same time you have bugs like these because the local crate visit is simplistic.
What's needed is a rustdoc rewrite that does as little as possible, working mostly with non-syntactical information and recovering the minimum required - relying too much on syntax can leak confusing context.
And it really shouldn't have two ASTs of its own. I know @cmr was frustrated with libsyntax but rustdoc is barely maintainable right now.
This bug is particularly confusing for crates that use Serde. Right now auto-derived implementations of Serialize/Deserialize don't show up in rustdoc.
Activity
eddyb commentedon Oct 3, 2016
@alexcrichton Ugh, the way
rustdocscans a crate is dubious at best. I've been having to patch uprustdocfor various typesystem/metadata changes, and it's really sad how items from extern crates are second-class, but at the same time you have bugs like these because the local crate visit is simplistic.What's needed is a
rustdocrewrite that does as little as possible, working mostly with non-syntactical information and recovering the minimum required - relying too much on syntax can leak confusing context.And it really shouldn't have two ASTs of its own. I know @cmr was frustrated with
libsyntaxbutrustdocis barely maintainable right now.alexcrichton commentedon Oct 3, 2016
@eddyb I think rustdoc's slogan is "dubious at best"
TyOverby commentedon Mar 27, 2017
This bug is particularly confusing for crates that use Serde. Right now auto-derived implementations of Serialize/Deserialize don't show up in rustdoc.
Use 'dummy module' instead of 'dummy const' in derive output
Use 'dummy module' instead of 'dummy const' in derive output
Use 'dummy module' instead of 'dummy const' in derive output
shepmaster commentedon Jul 4, 2018
Whew! This is super confusing!
QuietMisdreavus commentedon Aug 7, 2018
I've opened #53162 to fix this.
Auto merge of #53162 - QuietMisdreavus:crouching-impl-hidden-trait, r…
Rollup merge of rust-lang#53162 - QuietMisdreavus:crouching-impl-hidd…
Rollup merge of rust-lang#53162 - QuietMisdreavus:crouching-impl-hidd…