Skip to content
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

"Automatically" implemented traits do not display implementors (or as implemented traits) in rustdoc #89533

Open
nagisa opened this issue Oct 4, 2021 · 2 comments
Labels
A-trait-system Area: Trait system C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nagisa
Copy link
Member

nagisa commented Oct 4, 2021

We have a bunch of traits that are normal traits but implemented automatically for a bunch of stuff. std::ptr::Pointee, std::marker::DiscriminantKind and soon std::enums::AsRepr (#89507).

rustdoc generated documentation fails to account for those and does not populate the trait's Implementors section: https://doc.rust-lang.org/stable/std/marker/trait.DiscriminantKind.html nor do the types that implement the trait present these traits in the implementations section (e.g. https://doc.rust-lang.org/stable/std/cmp/enum.Ordering.html#trait-implementations)

@nagisa nagisa added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Oct 4, 2021
@camelid camelid added A-trait-system Area: Trait system C-bug Category: This is a bug. and removed A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Oct 18, 2021
@camelid
Copy link
Member

camelid commented Oct 18, 2021

normal traits but implemented automatically

They're not "normal" though since at least for Pointee, the impls are hardcoded by the compiler IIUC.

@nagisa
Copy link
Member Author

nagisa commented Oct 18, 2021

These all share that property, yes. By "normal" I really meant that they aren't an auto-trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants