Open
Description
Rustdoc silently (no warnings) generates broken links when the item being linked to is glob-reexported from a module with the #[doc(hidden)]
attribute that is from a different crate. This happens regardless of which crate the link is written in.
To reproduce, run cargo doc
on two crates foo
and bar
with the following contents:
// foo/src/lib.rs
#[doc(hidden)]
pub mod hidden_module {
/// [`FooOne`] [`FooTwo`] [`FooThree`]
pub struct FooOne;
pub struct FooTwo;
pub struct FooThree;
}
// bar/src/lib.rs
pub use foo::hidden_module::{FooTwo, *};
/// [`FooOne`] [`FooTwo`] [`FooThree`]
pub struct Bar;
The links to FooOne
and FooThree
are broken as if they were unknown names, even though rustdoc emits no warnings about them like it usually does for broken links, and the documentation is otherwise functional.
Meta
rustc --version --verbose
:
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-apple-darwin
release: 1.79.0
LLVM version: 18.1.7
Also reproduces on nightly.
@rustbot label +T-rustdoc