Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustdoc generic array impl doesnt show length #61487

Closed
DutchGhost opened this issue Jun 3, 2019 · 3 comments · Fixed by #61605
Closed

Rustdoc generic array impl doesnt show length #61487

DutchGhost opened this issue Jun 3, 2019 · 3 comments · Fixed by #61605
Assignees
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@DutchGhost
Copy link
Contributor

DutchGhost commented Jun 3, 2019

The following code:

#![feature(const_generics)]

pub trait Array {
    type Item;
}

impl <T, const N: usize> Array for [T; N] {
    type Item = T;
}

produces the following docpage:
https://imge.to/i/vedzx

Obviously the N is missing in the specification for what type the trait is implemented.. for [T; _]

@varkor varkor added A-const-generics Area: const generics (parameters and arguments) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jun 3, 2019
@GuillaumeGomez
Copy link
Member

That's because const-generics support continues to be added into rustdoc. Thanks for opening this issue, I'll fix it soon.

@GuillaumeGomez GuillaumeGomez self-assigned this Jun 6, 2019
@DutchGhost
Copy link
Contributor Author

No problem. I'll be happy trying to find more of these, so when the feature finally rolls out, we can generate clean and neat documentation for it :D

@GuillaumeGomez
Copy link
Member

Sure, but you'll have to be on nightly to keep up to date. :p

Centril added a commit to Centril/rust that referenced this issue Jun 7, 2019
…y, r=varkor

Fix slice const generic length display

Fixes rust-lang#61487.

r? @varkor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants