Rustdoc doesn't list all cfg's required for an item to be included
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
In the tokio RuntimeMetrics docs the majority of metrics require --cfg=tokio_unstable. Howver, some also require a target architecture with 64 bit atomics. For metrics which require both of these features rustdoc only shows one of them. Linked is an example: https://docs.rs/tokio/latest/tokio/runtime/struct.RuntimeMetrics.html#method.spawned_tasks_count
Here it says "Available on target_has_atomic="64" only." But it should say something like "Only available with target_has_atomic="64" and tokio_unstable."
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 the linked RuntimeMetrics documentation entry for spawned_tasks_count and compare its displayed availability conditions with the item's cfg requirements. Trace rustdoc's handling of combined cfg conditions, then verify that items requiring both target_has_atomic="64" and tokio_unstable display both conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100