Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle

Remove dead code in rustdoc stripper

No changes when this code is removed.

cc `@aDotInTheVoid`
r? `@notriddle`
This commit is contained in:
Yuki Okushi 2023-01-14 12:04:35 +09:00 committed by GitHub
commit 96d4d491d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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(..) => {}