Skip to content

impl<S> Trait<Struct> for S {} blanket impl shows up multiple times in docs for Struct #81483

Closed

Description

I tried documenting this code with cargo doc:

pub struct Struct;

pub trait Trait<T> {}

impl<S> Trait<Struct> for S {}

I expected to see this happen: The impl<S> Trait<Struct> for S {} blanket impl appears only once in the docs for Struct

Instead, this happened: The blanket impl appears 23 times.

Picture of the blanket impls in the docs for `Struct`

Meta

rustc --version --verbose:

rustc 1.51.0-nightly (a2f8f6281 2021-01-27)
binary: rustc
commit-hash: a2f8f6281817d430e20726128b739d3c6708561c
commit-date: 2021-01-27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)A-synthetic-implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsC-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