Skip to content

rustdoc fails to link to private items without warning #72769

Closed
@jyn514

Description

@jyn514

I tried this code:

/// See also [`g()`][crate::g]
pub fn f() {}

fn g() {}

I expected to see this happen:

warning: `[crate::g]` cannot be resolved, ignoring it.

or preferably

warning: `[crate::g]` is private and therefore cannot be linked, ignoring it.

Instead, this happened: The crate documents without warnings, but does not generate links: See also [g()][crate::g]

Meta

$ rustdoc +nightly --version
rustdoc 1.45.0-nightly (4bd32c980 2020-05-29)

@rustbot modify labels: T-rustdoc A-intra-doc-links

Metadata

Metadata

Assignees

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