rustdoc: indicate when a trait has non-defaulted hidden items
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
There’s a pattern of hiding a non-defaulted item in a trait to mark it as non-implementable, e.g. inventory::Collect:
This is primarily useful when a trait is implemented by a macro, so it can’t be properly sealed, but still needs to be only implementable by code “originating” in the same crate. It has some similarity with #[non_exhaustive] attribute.
Some options on how this could look:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rustdoc's handling of trait items and inspect the inventory/src/lib.rs example at lines 224-227. Compare the two proposed renderings in the issue and establish the intended presentation for traits with hidden non-defaulted items. Done means rustdoc clearly indicates this condition in the generated documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100