Skip to content

rustdoc cannot resolve private intra-rustdoc link #65697

Closed

Description

When in a private mod, rustdoc fails to resolve a private member when called with --document-private-items.

A project like this...
src/lib.rs:

mod foo;

src/foo.rs:

//! [`Bar`]
struct Bar;

... results in:

warning: `[Bar]` cannot be resolved, ignoring it...
 --> src/foo.rs:1:6
  |
1 | //! [`Bar`]
  |      ^^^^^ cannot be resolved, ignoring
  |
  = note: `#[warn(intra_doc_link_resolution_failure)]` on by default
  = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

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-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-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