Skip to content

Commit 96d4d49

Browse files
author
Yuki Okushi
authored
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`
2 parents 9b502a4 + 0482a48 commit 96d4d49

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/librustdoc/passes/stripper.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,7 @@ impl<'a, 'tcx> DocFolder for Stripper<'a, 'tcx> {
9797
}
9898

9999
// handled in the `strip-priv-imports` pass
100-
clean::ExternCrateItem { .. } => {}
101-
clean::ImportItem(ref imp) => {
102-
// Because json doesn't inline imports from private modules, we need to mark
103-
// the imported item as retained so it's impls won't be stripped.
104-
//
105-
// FIXME: Is it necessary to check for json output here: See
106-
// https://github.com/rust-lang/rust/pull/100325#discussion_r941495215
107-
if let Some(did) = imp.source.did && self.is_json_output {
108-
self.retained.insert(did.into());
109-
}
110-
}
100+
clean::ExternCrateItem { .. } | clean::ImportItem(_) => {}
111101

112102
clean::ImplItem(..) => {}
113103

0 commit comments

Comments
 (0)