16
16
#![ allow( internal_features) ]
17
17
#![ doc( rust_logo) ]
18
18
#![ 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) ]
26
20
#![ allow( broken_intra_doc_links) ]
27
21
#![ recursion_limit = "256" ]
28
22
#![ warn( rust_2018_idioms) ]
@@ -104,7 +98,7 @@ use rustc_codegen_ssa::traits::{
104
98
use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen } ;
105
99
use rustc_data_structures:: fx:: FxIndexMap ;
106
100
use rustc_data_structures:: sync:: IntoDynSyncSend ;
107
- use rustc_errors:: { DiagCtxt , ErrorGuaranteed } ;
101
+ use rustc_errors:: { DiagCtxtHandle , ErrorGuaranteed } ;
108
102
use rustc_metadata:: EncodedMetadata ;
109
103
use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
110
104
use rustc_middle:: ty:: TyCtxt ;
@@ -386,7 +380,7 @@ impl WriteBackendMethods for GccCodegenBackend {
386
380
387
381
unsafe fn optimize (
388
382
_cgcx : & CodegenContext < Self > ,
389
- _dcx : & DiagCtxt ,
383
+ _dcx : DiagCtxtHandle < ' _ > ,
390
384
module : & ModuleCodegen < Self :: Module > ,
391
385
config : & ModuleConfig ,
392
386
) -> Result < ( ) , FatalError > {
@@ -411,14 +405,17 @@ impl WriteBackendMethods for GccCodegenBackend {
411
405
412
406
unsafe fn codegen (
413
407
cgcx : & CodegenContext < Self > ,
414
- dcx : & DiagCtxt ,
408
+ dcx : DiagCtxtHandle < ' _ > ,
415
409
module : ModuleCodegen < Self :: Module > ,
416
410
config : & ModuleConfig ,
417
411
) -> Result < CompiledModule , FatalError > {
418
412
back:: write:: codegen ( cgcx, dcx, module, config)
419
413
}
420
414
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 ) {
422
419
unimplemented ! ( ) ;
423
420
}
424
421
@@ -428,7 +425,7 @@ impl WriteBackendMethods for GccCodegenBackend {
428
425
429
426
fn run_link (
430
427
cgcx : & CodegenContext < Self > ,
431
- dcx : & DiagCtxt ,
428
+ dcx : DiagCtxtHandle < ' _ > ,
432
429
modules : Vec < ModuleCodegen < Self :: Module > > ,
433
430
) -> Result < ModuleCodegen < Self :: Module > , FatalError > {
434
431
back:: write:: link ( cgcx, dcx, modules)
0 commit comments