1616#![ allow( internal_features) ]
1717#![ doc( rust_logo) ]
1818#![ feature( rustdoc_internals) ]
19- #![ feature(
20- rustc_private,
21- decl_macro,
22- never_type,
23- trusted_len,
24- hash_raw_entry
25- ) ]
19+ #![ feature( rustc_private, decl_macro, never_type, trusted_len, hash_raw_entry) ]
2620#![ allow( broken_intra_doc_links) ]
2721#![ recursion_limit = "256" ]
2822#![ warn( rust_2018_idioms) ]
@@ -104,7 +98,7 @@ use rustc_codegen_ssa::traits::{
10498use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen } ;
10599use rustc_data_structures:: fx:: FxIndexMap ;
106100use rustc_data_structures:: sync:: IntoDynSyncSend ;
107- use rustc_errors:: { DiagCtxt , ErrorGuaranteed } ;
101+ use rustc_errors:: { DiagCtxtHandle , ErrorGuaranteed } ;
108102use rustc_metadata:: EncodedMetadata ;
109103use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
110104use rustc_middle:: ty:: TyCtxt ;
@@ -386,7 +380,7 @@ impl WriteBackendMethods for GccCodegenBackend {
386380
387381 unsafe fn optimize (
388382 _cgcx : & CodegenContext < Self > ,
389- _dcx : & DiagCtxt ,
383+ _dcx : DiagCtxtHandle < ' _ > ,
390384 module : & ModuleCodegen < Self :: Module > ,
391385 config : & ModuleConfig ,
392386 ) -> Result < ( ) , FatalError > {
@@ -411,14 +405,17 @@ impl WriteBackendMethods for GccCodegenBackend {
411405
412406 unsafe fn codegen (
413407 cgcx : & CodegenContext < Self > ,
414- dcx : & DiagCtxt ,
408+ dcx : DiagCtxtHandle < ' _ > ,
415409 module : ModuleCodegen < Self :: Module > ,
416410 config : & ModuleConfig ,
417411 ) -> Result < CompiledModule , FatalError > {
418412 back:: write:: codegen ( cgcx, dcx, module, config)
419413 }
420414
421- fn prepare_thin ( _module : ModuleCodegen < Self :: Module > , _emit_summary : bool ) -> ( String , Self :: ThinBuffer ) {
415+ fn prepare_thin (
416+ _module : ModuleCodegen < Self :: Module > ,
417+ _emit_summary : bool ,
418+ ) -> ( String , Self :: ThinBuffer ) {
422419 unimplemented ! ( ) ;
423420 }
424421
@@ -428,7 +425,7 @@ impl WriteBackendMethods for GccCodegenBackend {
428425
429426 fn run_link (
430427 cgcx : & CodegenContext < Self > ,
431- dcx : & DiagCtxt ,
428+ dcx : DiagCtxtHandle < ' _ > ,
432429 modules : Vec < ModuleCodegen < Self :: Module > > ,
433430 ) -> Result < ModuleCodegen < Self :: Module > , FatalError > {
434431 back:: write:: link ( cgcx, dcx, modules)
0 commit comments