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 fails to display const generics correctly #61257

Closed
DutchGhost opened this issue May 28, 2019 · 0 comments · Fixed by #61293
Closed

rustdoc fails to display const generics correctly #61257

DutchGhost opened this issue May 28, 2019 · 0 comments · Fixed by #61293
Assignees
Labels
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.

Comments

@DutchGhost
Copy link
Contributor

DutchGhost commented May 28, 2019

Having the following code in lib.rs:

#![feature(const_generics)]

use core::ops::Add;

pub struct Simd<T, const WIDTH: usize> {
    inner: T
}

impl Add for Simd<u8, 16> {
    type Output = Self;

    fn add(self, rhs: Self) -> Self::Output {
        Self { inner: 0 }
    }
}

produces a funny looking rustdoc page:

http://prntscr.com/nuc2w4

Maybe related to #60737 ?

@jonas-schievink jonas-schievink 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. labels May 28, 2019
@varkor varkor self-assigned this May 28, 2019
Centril added a commit to Centril/rust that referenced this issue May 29, 2019
… r=GuillaumeGomez

Print const generics properly in rustdoc

Now that rust-lang#59276 is merged, we can print consts properly in rustdoc.

Fixes rust-lang#60737.
Fixes rust-lang#61257.

r? @GuillaumeGomez
Centril added a commit to Centril/rust that referenced this issue May 29, 2019
… r=GuillaumeGomez

Print const generics properly in rustdoc

Now that rust-lang#59276 is merged, we can print consts properly in rustdoc.

Fixes rust-lang#60737.
Fixes rust-lang#61257.

r? @GuillaumeGomez
oli-obk added a commit to oli-obk/rust that referenced this issue May 29, 2019
… r=GuillaumeGomez

Print const generics properly in rustdoc

Now that rust-lang#59276 is merged, we can print consts properly in rustdoc.

Fixes rust-lang#60737.
Fixes rust-lang#61257.

r? @GuillaumeGomez
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) 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