Skip to content

rustdoc does not warn when linking to an item with no generated docs #81979

Open
@jyn514

Description

@jyn514

I tried this code:

//! Link to [S]

#[doc(no_inline)]
pub use inner::S;

mod inner {
    pub struct S;
}

I expected to see this happen: Rustdoc warns that the links will all be broken

Instead, this happened: Rustdoc gives no warning and generates HTML that looks bad:
image

Meta

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

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.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