X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustdoc%2Fpasses%2Fstripper.rs;h=048ed2646233c45284f6a029b4c37dcf548a9c5c;hb=81da2a19fa2adb8bb2828287c2cae1e9c7c51445;hp=f5501b3d5238b82c1ef80326f4a85061e0ddd0da;hpb=9b502a4765b80f4ffaaf23ede63d8a823ad93272;p=rust.git diff --git a/src/librustdoc/passes/stripper.rs b/src/librustdoc/passes/stripper.rs index f5501b3d523..048ed264623 100644 --- a/src/librustdoc/passes/stripper.rs +++ b/src/librustdoc/passes/stripper.rs @@ -97,17 +97,7 @@ fn fold_item(&mut self, i: Item) -> Option { } // 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(..) => {}