-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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.
Description
I tried this code:
/// [`std::fs`]
pub use foo as foo2;
pub fn foo(){}
fn main() {}
I expected to see this happen:
If I run cargo +nightly doc
I get no warnings/errors.
Instead, this happened:
$ cargo +nightly doc
Documenting foo v0.1.0 (/home/veetaha/junk/rust-sandbox)
warning: unresolved link to `std::fs`
--> src/main.rs:1:6
|
1 | /// [`std::fs`]
| ^^^^^^^^^ unresolved link
|
= note: `#[warn(broken_intra_doc_links)]` on by default
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
warning: 1 warning emitted
Note that if I remove pub
from the use
statement, no warnings are emitted...
Meta
rustc --version --verbose
:
rustc 1.47.0-nightly (2d8a3b918 2020-08-26)
binary: rustc
commit-hash: 2d8a3b9181f41d3af9b9f016c5d73b2553e344bf
commit-date: 2020-08-26
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 11.0
rustdoc --version --verbose
:
rustdoc 1.47.0-nightly (2d8a3b918 2020-08-26)
binary: rustdoc
commit-hash: 2d8a3b9181f41d3af9b9f016c5d73b2553e344bf
commit-date: 2020-08-26
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 11.0
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.