Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dtolnay opened this issue Jun 21, 2024 · 2 comments · Fixed by #129414
Closed

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

dtolnay opened this issue Jun 21, 2024 · 2 comments · Fixed by #129414
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@dtolnay
Copy link
Member

dtolnay commented Jun 21, 2024

// 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.

@dtolnay dtolnay added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jun 21, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 21, 2024
@Indra-db
Copy link

Indra-db commented Jun 23, 2024

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

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 20, 2024
@GuillaumeGomez
Copy link
Member

Found the bug. Sending the fix.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 22, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 22, 2024
tgross35 added a commit to tgross35/rust that referenced this issue Aug 23, 2024
…es, r=notriddle

Fix extern crates not being hidden with `doc(hidden)`

Fixes rust-lang#126796.

Only the current crate should never be stripped, any other crate should be strippable.

r? `@notriddle`
@bors bors closed this as completed in 65af38a Aug 23, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 23, 2024
Rollup merge of rust-lang#129414 - GuillaumeGomez:fix-doc-hidden-crates, r=notriddle

Fix extern crates not being hidden with `doc(hidden)`

Fixes rust-lang#126796.

Only the current crate should never be stripped, any other crate should be strippable.

r? ``@notriddle``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants