Skip to content

Commit e6c1db7

Browse files
Update documentation for rustdoc_json_types::Import::Id
1 parent 53d54bd commit e6c1db7

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/rustdoc-json-types/lib.rs

+17-2
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,25 @@ pub struct Import {
669669
/// May be different from the last segment of `source` when renaming imports:
670670
/// `use source as name;`
671671
pub name: String,
672-
/// The ID of the item being imported. Will be `None` in case of re-exports of primitives:
673-
/// ```rust
672+
/// The ID of the item being imported. Will be `None` in case of re-exports of primitives or
673+
/// if the reexported item is `#[doc(hidden)]` or inherits it from one of its parents.
674+
///
675+
/// Example of reexported primitive type:
676+
///
677+
/// ```
674678
/// pub use i32 as my_i32;
675679
/// ```
680+
///
681+
/// Example of reexported item which inherits `doc(hidden)`:
682+
///
683+
/// ```
684+
/// #[doc(hidden)]
685+
/// pub mod foo {
686+
/// pub struct Bar;
687+
/// }
688+
///
689+
/// pub use foo::Bar;
690+
/// ```
676691
pub id: Option<Id>,
677692
/// Whether this import uses a glob: `use source::*;`
678693
pub glob: bool,

0 commit comments

Comments
 (0)