-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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 nameC-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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
I tried this code:
pub struct Body;
impl Body {
pub fn empty() -> Self {
Body
}
}
impl Default for Body {
/// Returns [`Body::empty()`](Body::empty).
fn default() -> Body {
Body::empty()
}
}
I expected to see this happen: rustdoc generates intradoc links correctly
Instead, this happened: rustdoc cannot resolve Body::empty
.
warning: `[Body::empty]` cannot be resolved, ignoring it.
--> body.rs:10:35
|
10 | /// Returns [`Body::empty()`](Body::empty).
| ^^^^^^^^^^^ 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 `\]`
Meta
rustdoc +nightly --version --verbose
:
rustdoc 1.45.0-nightly (d79f1bd31 2020-05-17)
binary: rustdoc
commit-hash: d79f1bd31a1401b5d08096fcdf9a9eb23ddf95df
commit-date: 2020-05-17
host: x86_64-unknown-linux-gnu
release: 1.45.0-nightly
LLVM version: 9.0
This looks like a regression from #72173, cc @xliiv.
@rustbot modify labels: T-rustdoc A-intra-doc-links C-bug regression-from-stable-to-nightly
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 nameC-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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.