File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/doc/rustdoc/src/write-documentation Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,22 @@ pub struct Hidden;
8585pub use self::Hidden as InlinedHidden;
8686```
8787
88- The same applies on re-exports themselves: if you have multiple re-exports and some of them have
88+ However, if you still want the re-export itself to be visible, you can add the ` #[doc(inline)] `
89+ attribute on it:
90+
91+ ``` rust,ignore (inline)
92+ // This struct won't be visible.
93+ #[doc(hidden)]
94+ pub struct Hidden;
95+
96+ #[doc(inline)]
97+ pub use self::Hidden as InlinedHidden;
98+ ```
99+
100+ In this case, you will have ` pub use self::Hidden as InlinedHidden; ` in the generated documentation
101+ but no link to the ` Hidden ` item.
102+
103+ So back to ` #[doc(hidden)] ` : if you have multiple re-exports and some of them have
89104` #[doc(hidden)] ` , then these ones (and only these) won't appear in the documentation:
90105
91106``` rust,ignore (inline)
You can’t perform that action at this time.
0 commit comments