rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
95.25k stars 12.27k forks source link

`doc(inline)` overrides `doc(hidden)`, but only for crates #126796

Open dtolnay opened 1 month ago

dtolnay commented 1 month ago
// src/lib.rs

#![doc(hidden)]

#[doc(inline)]
pub use std;

#[doc(inline)]
pub use std::marker;

#[doc(inline)]
pub use std::marker::PhantomData;

Expected: empty documentation, as you would get with no items in the crate, or without #[doc(inline)] on the items.

Actual, as of rustdoc 1.70 through current nightly: the crate std is shown despite #[doc(hidden)]. The other 2 items are correctly not shown.

Indra-db commented 4 weeks ago

ran into this bug as well today where structs and traits aren't hidden anymore when the use statement is inlined :/.