-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-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 was able to find 3 different ways to handle re-exports of items with #[doc(hidden)]
:
mod private_module {
#[doc(hidden)]
pub struct Public;
#[doc(hidden)]
pub type Bar = u32;
}
#[doc(hidden)]
pub type Bar = u32;
#[doc(hidden)]
pub fn foo() {}
#[doc(hidden)]
mod module {
pub struct Public;
pub type Bar = u32;
}
pub use self::private_module::Public as Foo; // doesn't appear
pub use self::private_module::Bar as Foo2; // doesn't appear
pub use crate::Bar as Yo; // re-export is displayed, but no link to `Yo`
pub use crate::foo as yo; // re-export is displayed, but no link to `foo`
pub use self::module::Public as Foo3; // inlined
pub use self::module::Bar as Foo4; // inlined
I think that for module
items to be inlined, it's ok since the module and not the items are hidden.
However, the question becomes interesting for the two other cases where doc(hidden)
is directly on the item: should we display the re-export in any case or not?
Metadata
Metadata
Assignees
Labels
C-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.