]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc-json: Remove doc FIXME for Import::id and explain
authorMartin Nordholts <enselic@gmail.com>
Tue, 19 Jul 2022 20:33:47 +0000 (22:33 +0200)
committerMartin Nordholts <enselic@gmail.com>
Tue, 19 Jul 2022 20:43:39 +0000 (22:43 +0200)
src/rustdoc-json-types/lib.rs

index 761e94c7ebbc44d66df46c8dab17b9c3b1c9cffe..170da7655f60a13ac9d3f1e75b31773deb067fae 100644 (file)
@@ -561,8 +561,11 @@ pub struct Import {
     /// May be different from the last segment of `source` when renaming imports:
     /// `use source as name;`
     pub name: String,
-    /// The ID of the item being imported.
-    pub id: Option<Id>, // FIXME is this actually ever None?
+    /// The ID of the item being imported. Will be `None` in case of re-exports of primitives:
+    /// ```rust
+    /// pub use i32 as my_i32;
+    /// ```
+    pub id: Option<Id>,
     /// Whether this import uses a glob: `use source::*;`
     pub glob: bool,
 }