File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -294,11 +294,13 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
294
294
unreachable ! ( "RUN_ON_MODULE = false, should never call mod_item_in" )
295
295
}
296
296
297
- fn after_krate ( self ) -> Result < ( ) , Error > {
297
+ fn after_krate ( mut self ) -> Result < ( ) , Error > {
298
298
debug ! ( "Done with crate" ) ;
299
299
300
300
let e = ExternalCrate { crate_num : LOCAL_CRATE } ;
301
- let index = self . index . clone ( ) ;
301
+
302
+ // We've finished using the index, and don't want to clone it, because it is big.
303
+ let index = std:: mem:: take ( & mut self . index ) ;
302
304
303
305
// Note that tcx.rust_target_features is inappropriate here because rustdoc tries to run for
304
306
// multiple targets: https://github.com/rust-lang/rust/pull/137632
You can’t perform that action at this time.
0 commit comments