Rustdoc should consider not hiding items that come from the same Cargo workspace
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
With PR https://github.com/rust-lang/rust/pull/124939, rustdoc hides in the "Aliased type" section of type alias every type that is not from the current crate.
However if we had access in rustdoc to the Cargo workspace information we could instead be more fine-grain and not hide those coming from the same workspace.
Crate A:
pub struct One<T>(T);
Crate B:
pub type OneString = One<String>;
If crate A and B are in the same workspace we should probably not hide the inner item, and therefor display:
// in Aliased Type
struct OneString(String)
// instead of
struct OneString(/* private items */)
@rustbot labels +T-rustdoc +A-rustdoc-ui +C-discussion
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 reading PR 124939 and the rustdoc behavior for the “Aliased type” section. Investigate how rustdoc could access Cargo workspace information and distinguish same-workspace items from other crates. Done means a type alias from a same-workspace crate displays its inner item, such as OneString(String), instead of /* private items */.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100