Skip to content

~const makes rustdoc show duplicate bounds #104886

Open
@GoldsteinE

Description

@GoldsteinE

For example, see documentation for the Ord trait from the standard library:

pub trait Ord: Eq + PartialOrd<Self> {
    fn cmp(&self, other: &Self) -> Ordering;

    fn max(self, other: Self) -> Self { ... }
    fn min(self, other: Self) -> Self { ... }
    fn clamp(self, min: Self, max: Self) -> Self
    where
        Self: PartialOrd<Self>,
        //    ^^^^^^^^^^^^^^^^ - this bound is already specified above
    { ... }
}

This is slightly confusing IMO.

Related to #91187

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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