mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
Remove dead code in rustdoc stripper
This commit is contained in:
parent
36c9b49c14
commit
0482a48dab
@ -97,17 +97,7 @@ impl<'a, 'tcx> DocFolder for Stripper<'a, 'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handled in the `strip-priv-imports` pass
|
// handled in the `strip-priv-imports` pass
|
||||||
clean::ExternCrateItem { .. } => {}
|
clean::ExternCrateItem { .. } | clean::ImportItem(_) => {}
|
||||||
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::ImplItem(..) => {}
|
clean::ImplItem(..) => {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user