Skip to content

Commit

Permalink
Remove dead code in rustdoc stripper
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 12, 2023
1 parent 36c9b49 commit 0482a48
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/librustdoc/passes/stripper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,7 @@ impl<'a, 'tcx> DocFolder for Stripper<'a, 'tcx> {
}

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

Expand Down

0 comments on commit 0482a48

Please sign in to comment.