Skip to content

rustdoc fails to display const generics correctly #61257

Closed
@DutchGhost

Description

@DutchGhost

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 ?

Metadata

Metadata

Assignees

Labels

A-const-genericsArea: const generics (parameters and arguments)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions