Intra-doc links are unresolved on pub use _ as _
items · Issue #76073 · rust-lang/rust (original) (raw)
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