Skip to content

rustdoc: broken_intra_doc_links triggers on link to private item #83049

Open
@camelid

Description

@camelid

⚠️ Warning ⚠️

Discussion needs to take place and agreement needs to be reached before implementing this! See #83049 (comment).


This should succeed, but it does not.

mod foo {
    //! Look at [super::bar::baz].
}

mod bar {
    fn baz() {}
}
$ rustdoc foo.rs --document-private-items
warning: unresolved link to `super::bar::baz`
 --> foo.rs:2:18
  |
2 |     //! Look at [super::bar::baz].
  |                  ^^^^^^^^^^^^^^^ no item named `baz` in module `bar`
  |
  = note: `#[warn(broken_intra_doc_links)]` on by default

warning: 1 warning emitted

Metadata

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.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.P-lowLow priorityT-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