]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/passes/stripper.rs
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
[rust.git] / src / librustdoc / passes / stripper.rs
index f5501b3d5238b82c1ef80326f4a85061e0ddd0da..048ed2646233c45284f6a029b4c37dcf548a9c5c 100644 (file)
@@ -97,17 +97,7 @@ fn fold_item(&mut self, i: Item) -> Option<Item> {
             }
 
             // handled in the `strip-priv-imports` pass
-            clean::ExternCrateItem { .. } => {}
-            clean::ImportItem(ref imp) => {
-                // Because json doesn't inline imports from private modules, we need to mark
-                // the imported item as retained so it's impls won't be stripped.
-                //
-                // FIXME: Is it necessary to check for json output here: See
-                // https://github.com/rust-lang/rust/pull/100325#discussion_r941495215
-                if let Some(did) = imp.source.did && self.is_json_output {
-                    self.retained.insert(did.into());
-                }
-            }
+            clean::ExternCrateItem { .. } | clean::ImportItem(_) => {}
 
             clean::ImplItem(..) => {}