@@ -364,7 +364,8 @@ pub(crate) fn run_thin(
364364 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
365365) -> Result < ( Vec < LtoModuleCodegen < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
366366 let dcx = cgcx. create_dcx ( ) ;
367- let lto_data = prepare_lto ( cgcx, & dcx) ?;
367+ let dcx = dcx. handle ( ) ;
368+ let lto_data = prepare_lto ( cgcx, dcx) ?;
368369 /*let symbols_below_threshold =
369370 symbols_below_threshold.iter().map(|c| c.as_ptr()).collect::<Vec<_>>();*/
370371 if cgcx. opts . cg . linker_plugin_lto . enabled ( ) {
@@ -375,7 +376,7 @@ pub(crate) fn run_thin(
375376 }
376377 thin_lto (
377378 cgcx,
378- & dcx,
379+ dcx,
379380 modules,
380381 lto_data. upstream_modules ,
381382 lto_data. tmp_path ,
@@ -425,7 +426,7 @@ pub(crate) fn prepare_thin(
425426/// they all go out of scope.
426427fn thin_lto (
427428 cgcx : & CodegenContext < GccCodegenBackend > ,
428- _dcx : & DiagCtxt ,
429+ _dcx : DiagCtxtHandle < ' _ > ,
429430 modules : Vec < ( String , ThinBuffer ) > ,
430431 serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
431432 tmp_path : TempDir ,
0 commit comments