Description
Code
I ran cargo doc
with this code:
# Cargo.toml
[package]
name = "repro"
version = "0.1.0"
edition = "2021"
[lib]
proc-macro = true
/// [`Unpin`]
#[proc_macro_derive(F)]
pub fn derive_(t: proc_macro::TokenStream) -> proc_macro::TokenStream {
t
}
/// [`Unpin`]
#[proc_macro_attribute]
pub fn attr(t: proc_macro::TokenStream, _: proc_macro::TokenStream) -> proc_macro::TokenStream {
t
}
/// [`Unpin`]
#[proc_macro]
pub fn func(t: proc_macro::TokenStream) -> proc_macro::TokenStream {
t
}
I expected to see this happen: intra-doc-links work and no warning
Instead, this happened:
intra-doc-links is not working in the generated docs.
And I got broken_intra_doc_links warnings:
warning: unresolved link to `Unpin`
--> src/lib.rs:1:7
|
1 | /// [`Unpin`]
| ^^^^^ no item named `Unpin` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
warning: unresolved link to `Unpin`
--> src/lib.rs:7:7
|
7 | /// [`Unpin`]
| ^^^^^ no item named `Unpin` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
warning: unresolved link to `Unpin`
--> src/lib.rs:13:7
|
13 | /// [`Unpin`]
| ^^^^^ no item named `Unpin` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Version it worked on
It most recently worked on: nightly-2023-02-11
Version with regression
rustc --version --verbose
:
rustc 1.69.0-nightly (585f3eef2 2023-02-11)
binary: rustc
commit-hash: 585f3eef26f04440bca726c29193af7b4fa90e54
commit-date: 2023-02-11
host: aarch64-apple-darwin
release: 1.69.0-nightly
LLVM version: 15.0.7
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged