@@ -14,16 +14,15 @@ use rustc_codegen_ssa::common::{
14
14
use rustc_codegen_ssa:: mir:: operand:: { OperandRef , OperandValue } ;
15
15
use rustc_codegen_ssa:: mir:: place:: PlaceRef ;
16
16
use rustc_codegen_ssa:: traits:: {
17
- BackendTypes , BaseTypeMethods , BuilderMethods , ConstMethods , HasCodegen , LayoutTypeMethods ,
18
- OverflowOp , StaticBuilderMethods ,
17
+ BackendTypes , BaseTypeCodegenMethods , BuilderMethods , ConstCodegenMethods ,
18
+ LayoutTypeCodegenMethods , OverflowOp , StaticBuilderMethods ,
19
19
} ;
20
20
use rustc_codegen_ssa:: MemFlags ;
21
21
use rustc_data_structures:: fx:: FxHashSet ;
22
22
use rustc_middle:: bug;
23
23
use rustc_middle:: middle:: codegen_fn_attrs:: CodegenFnAttrs ;
24
24
use rustc_middle:: ty:: layout:: {
25
25
FnAbiError , FnAbiOfHelpers , FnAbiRequest , HasParamEnv , HasTyCtxt , LayoutError , LayoutOfHelpers ,
26
- TyAndLayout ,
27
26
} ;
28
27
use rustc_middle:: ty:: { Instance , ParamEnv , Ty , TyCtxt } ;
29
28
use rustc_span:: def_id:: DefId ;
@@ -460,10 +459,6 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
460
459
}
461
460
}
462
461
463
- impl < ' gcc , ' tcx > HasCodegen < ' tcx > for Builder < ' _ , ' gcc , ' tcx > {
464
- type CodegenCx = CodegenCx < ' gcc , ' tcx > ;
465
- }
466
-
467
462
impl < ' tcx > HasTyCtxt < ' tcx > for Builder < ' _ , ' _ , ' tcx > {
468
463
fn tcx ( & self ) -> TyCtxt < ' tcx > {
469
464
self . cx . tcx ( )
@@ -477,17 +472,13 @@ impl HasDataLayout for Builder<'_, '_, '_> {
477
472
}
478
473
479
474
impl < ' tcx > LayoutOfHelpers < ' tcx > for Builder < ' _ , ' _ , ' tcx > {
480
- type LayoutOfResult = TyAndLayout < ' tcx > ;
481
-
482
475
#[ inline]
483
476
fn handle_layout_err ( & self , err : LayoutError < ' tcx > , span : Span , ty : Ty < ' tcx > ) -> ! {
484
477
self . cx . handle_layout_err ( err, span, ty)
485
478
}
486
479
}
487
480
488
481
impl < ' tcx > FnAbiOfHelpers < ' tcx > for Builder < ' _ , ' _ , ' tcx > {
489
- type FnAbiOfResult = & ' tcx FnAbi < ' tcx , Ty < ' tcx > > ;
490
-
491
482
#[ inline]
492
483
fn handle_fn_abi_err (
493
484
& self ,
@@ -531,6 +522,8 @@ fn set_rvalue_location<'a, 'gcc, 'tcx>(
531
522
}
532
523
533
524
impl < ' a , ' gcc , ' tcx > BuilderMethods < ' a , ' tcx > for Builder < ' a , ' gcc , ' tcx > {
525
+ type CodegenCx = CodegenCx < ' gcc , ' tcx > ;
526
+
534
527
fn build ( cx : & ' a CodegenCx < ' gcc , ' tcx > , block : Block < ' gcc > ) -> Builder < ' a , ' gcc , ' tcx > {
535
528
Builder :: with_cx ( cx, block)
536
529
}
0 commit comments