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> {
294294 unreachable ! ( "RUN_ON_MODULE = false, should never call mod_item_in" )
295295 }
296296
297- fn after_krate ( self ) -> Result < ( ) , Error > {
297+ fn after_krate ( mut self ) -> Result < ( ) , Error > {
298298 debug ! ( "Done with crate" ) ;
299299
300300 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 ) ;
302304
303305 // Note that tcx.rust_target_features is inappropriate here because rustdoc tries to run for
304306 // multiple targets: https://github.com/rust-lang/rust/pull/137632
You can’t perform that action at this time.
0 commit comments