`Methods from Deref<Target=[T]>` doesnt appear for type aliases
Open
Nobody has claimed this yet.
A-rustdoc-js
C-bug
T-rustdoc
T-rustdoc-frontend
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I have a type alias for a type that implements Deref<Target=[T], but Rustdoc doesnt generate the corresponding section in the sidebar like it does for the concrete type I'm aliasing
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct Col<T: Copy, const N: usize> {
data: [T; N],
}
pub type Mat<T, const H: usize, const W: usize> = Col<Col<T, W>, H>;
// snip
impl<T: Copy, const N: usize> Deref for Col<T, N> {
type Target = [T];
fn deref(&self) -> &Self::Target {
&self.data
}
}
rustdoc 1.82.0 (f6e511eec 2024-10-15) on macOS 15.2
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 Rust reproducer in the issue and generate rustdoc for the concrete type and its type alias, comparing the sidebar sections. Trace how rustdoc handles methods from Deref for each form. Done means the alias documents the corresponding Deref methods consistently with the concrete type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100