- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Closed
Closed
Copy link
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 nameP-mediumMedium priorityMedium priorityT-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
Code
I tried this code:
pub mod r#impl {
    pub struct S;
    impl S {
        /// See [`b`]
        ///
        /// [`b`]: Self::b
        pub fn a() {
        }
        pub fn b() {
        }
    }
}I expected to see this happen: The link resolves to S::b.
Instead, this happened: rustdoc can't resolve the link
$ cargo +nightly-2020-12-01 doc
 Documenting intra-doc-raw-identifier v0.1.0 (/projects/rust/intra-doc-raw-identifier)
warning: unresolved link to `crate::r#impl::S::b`
 --> src/lib.rs:7:20
  |
7 |         /// [`b`]: Self::b
  |                    ^^^^^^^ no item named `r#impl` in module `intra_doc_raw_identifier`
  |
  = note: `#[warn(broken_intra_doc_links)]` on by default
Version it worked on
It most recently worked on: stable and <=nightly-2020-11-30
Version with regression
rustdoc +nightly-2020-12-01 --version --verbose:
rustdoc 1.50.0-nightly (b7ebc6b0c 2020-11-30)
binary: rustdoc
commit-hash: b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18
commit-date: 2020-11-30
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly
Erk-
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 nameP-mediumMedium priorityMedium priorityT-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.