rustdoc: Don't expand type aliases in inherent impls
Open
Nobody has claimed this yet.
A-rustdoc-ui
C-enhancement
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Currently, rustdoc expands aliases when used as the type of an inherent implementation:
pub struct Foo<T>(T);
pub type Simple = Foo<()>;
impl Simple {
pub fn xyz() {}
}
Generates:
I expected to see impl Simple (especially since Simple is left unexpanded in function signatures).
@rustbot label +A-rustdoc-ui +C-enhancement
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 reproducing the issue's Rust example with rustdoc and compare the generated output with the expected impl Simple rendering. Trace the rustdoc handling of inherent implementations and type aliases; done means the alias remains unexpanded in the impl output while existing function-signature behavior is preserved.
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
- 35/100