Skip to content

Rustdoc does not warn when linking to a private associated item #81981

Closed

Description

@jyn514

I tried this code:

//! Link to [S::f]

pub use inner::S;

mod inner {
    pub struct S;
    impl S {
        fn f() {}
    }
}

I expected to see this happen: Rustdoc warns that S::f is private, the same way it would warn if S were private.

Instead, this happened: Rustdoc gives no warning and generates no link.

Meta

rustdoc --version: rustdoc 1.52.0-nightly (9778068 2021-02-07)

Activity

  1. added
    T-rustdoc
    A-diagnostics
    A-visibility
    C-bug
    A-intra-doc-links
    on Feb 11, 2021
  2. added 2 commits that reference this issue on Feb 12, 2021
  3. added a commit that references this issue on Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsA-intra-doc-linksA-visibilityC-bugT-rustdoc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions