@@ -100,7 +100,7 @@ use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModul
100100use rustc_data_structures:: fx:: FxIndexMap ;
101101use rustc_data_structures:: sync:: IntoDynSyncSend ;
102102use rustc_codegen_ssa:: traits:: { CodegenBackend , ExtraBackendMethods , ThinBufferMethods , WriteBackendMethods } ;
103- use rustc_errors:: { ErrorGuaranteed , Handler } ;
103+ use rustc_errors:: { ErrorGuaranteed , DiagCtxt } ;
104104use rustc_metadata:: EncodedMetadata ;
105105use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
106106use rustc_middle:: util:: Providers ;
@@ -330,7 +330,7 @@ impl WriteBackendMethods for GccCodegenBackend {
330330 unimplemented ! ( )
331331 }
332332
333- unsafe fn optimize ( _cgcx : & CodegenContext < Self > , _diag_handler : & Handler , module : & ModuleCodegen < Self :: Module > , config : & ModuleConfig ) -> Result < ( ) , FatalError > {
333+ unsafe fn optimize ( _cgcx : & CodegenContext < Self > , _diag_handler : & DiagCtxt , module : & ModuleCodegen < Self :: Module > , config : & ModuleConfig ) -> Result < ( ) , FatalError > {
334334 module. module_llvm . context . set_optimization_level ( to_gcc_opt_level ( config. opt_level ) ) ;
335335 Ok ( ( ) )
336336 }
@@ -344,7 +344,7 @@ impl WriteBackendMethods for GccCodegenBackend {
344344 unimplemented ! ( ) ;
345345 }
346346
347- unsafe fn codegen ( cgcx : & CodegenContext < Self > , diag_handler : & Handler , module : ModuleCodegen < Self :: Module > , config : & ModuleConfig ) -> Result < CompiledModule , FatalError > {
347+ unsafe fn codegen ( cgcx : & CodegenContext < Self > , diag_handler : & DiagCtxt , module : ModuleCodegen < Self :: Module > , config : & ModuleConfig ) -> Result < CompiledModule , FatalError > {
348348 back:: write:: codegen ( cgcx, diag_handler, module, config)
349349 }
350350
@@ -356,7 +356,7 @@ impl WriteBackendMethods for GccCodegenBackend {
356356 unimplemented ! ( ) ;
357357 }
358358
359- fn run_link ( cgcx : & CodegenContext < Self > , diag_handler : & Handler , modules : Vec < ModuleCodegen < Self :: Module > > ) -> Result < ModuleCodegen < Self :: Module > , FatalError > {
359+ fn run_link ( cgcx : & CodegenContext < Self > , diag_handler : & DiagCtxt , modules : Vec < ModuleCodegen < Self :: Module > > ) -> Result < ModuleCodegen < Self :: Module > , FatalError > {
360360 back:: write:: link ( cgcx, diag_handler, modules)
361361 }
362362}
0 commit comments