rustdoc: Feature-dependent trait impls don't have the feature dependency called out.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Example: https://docs.rs/aead/0.5.2/aead/struct.Error.html . Reading those docs suggests that the aead::Error type implements std::error::Error unconditionally. However if you look at the source code, the impl is gated by the std feature, which in this crate is disabled by default.
This is a little confusing, because in general docs.rs is very good about flagging feature-dependent crate components. For example, also in the aead crate, the Aead trait is prominently flagged as requiring the alloc feature.
It would be nice to flag feature-dependent trait implementations in the same fashion.
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 by examining rustdoc's handling of feature-gated items and compare the aead::Error and Aead examples linked in the issue. Trace how trait implementations are rendered, then verify that an implementation gated by a crate feature is visibly marked as requiring that feature in generated documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100