Skip to content

rustdoc: blanket impl is not listed if trait is reexported from a private module #94183

Closed
@Xiretza

Description

@Xiretza

I tried this code:

mod actual_sub {
    pub trait Actual {}
}
pub use actual_sub::Actual;

impl<T> Actual for T {}

pub struct S;

I expected to see this happen: the documentation for S shows that it implements Actual.

Instead, this happened: Actual is not listed in the list of blanket impls on S.

If actual_sub is made pub, the Actual blanket impl is now listed in the docs for S.

Meta

rustc --version --verbose:

rustc 1.61.0-nightly (3b348d932 2022-02-19)
binary: rustc
commit-hash: 3b348d932aa5c9884310d025cf7c516023fd0d9a
commit-date: 2022-02-19
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0

cc #24305

Metadata

Metadata

Assignees

No one assigned

    Labels

    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