-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
Code
pub mod foo {
/// See also [`crate::bar::bun`].
/// See also [`bar::bun`][crate::bar::bun].
/// See also [`bar::bun`](crate::bar::bun).
pub fn fun() {}
}
#[doc(hidden)]
pub mod bar {
pub fn bun() {}
}
Reproduction Steps
cargo doc
Expected Outcome
There should be warnings for all of the broken links.
If the item is private instead of hidden, there are currently three private_intra_doc_links
warnings. Hidden items should be treated similarly to private ones.
Actual Output
No warnings. The first two links appear as unprocessed brackets, and the last one has crate::bar::bun
as a URL.
Version
rustdoc 1.90.0-nightly (498ae9fed 2025-07-28)
@rustbot label +A-intra-doc-links +A-lints
cc @lolbinarycat who seems to be interested in intra-doc link linting.
Metadata
Metadata
Assignees
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.