@@ -14,16 +14,15 @@ use rustc_codegen_ssa::common::{
1414use rustc_codegen_ssa:: mir:: operand:: { OperandRef , OperandValue } ;
1515use rustc_codegen_ssa:: mir:: place:: PlaceRef ;
1616use rustc_codegen_ssa:: traits:: {
17- BackendTypes , BaseTypeMethods , BuilderMethods , ConstMethods , HasCodegen , LayoutTypeMethods ,
18- OverflowOp , StaticBuilderMethods ,
17+ BackendTypes , BaseTypeCodegenMethods , BuilderMethods , ConstCodegenMethods ,
18+ LayoutTypeCodegenMethods , OverflowOp , StaticBuilderMethods ,
1919} ;
2020use rustc_codegen_ssa:: MemFlags ;
2121use rustc_data_structures:: fx:: FxHashSet ;
2222use rustc_middle:: bug;
2323use rustc_middle:: middle:: codegen_fn_attrs:: CodegenFnAttrs ;
2424use rustc_middle:: ty:: layout:: {
2525 FnAbiError , FnAbiOfHelpers , FnAbiRequest , HasParamEnv , HasTyCtxt , LayoutError , LayoutOfHelpers ,
26- TyAndLayout ,
2726} ;
2827use rustc_middle:: ty:: { Instance , ParamEnv , Ty , TyCtxt } ;
2928use rustc_span:: def_id:: DefId ;
@@ -460,10 +459,6 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
460459 }
461460}
462461
463- impl < ' gcc , ' tcx > HasCodegen < ' tcx > for Builder < ' _ , ' gcc , ' tcx > {
464- type CodegenCx = CodegenCx < ' gcc , ' tcx > ;
465- }
466-
467462impl < ' tcx > HasTyCtxt < ' tcx > for Builder < ' _ , ' _ , ' tcx > {
468463 fn tcx ( & self ) -> TyCtxt < ' tcx > {
469464 self . cx . tcx ( )
@@ -477,17 +472,13 @@ impl HasDataLayout for Builder<'_, '_, '_> {
477472}
478473
479474impl < ' tcx > LayoutOfHelpers < ' tcx > for Builder < ' _ , ' _ , ' tcx > {
480- type LayoutOfResult = TyAndLayout < ' tcx > ;
481-
482475 #[ inline]
483476 fn handle_layout_err ( & self , err : LayoutError < ' tcx > , span : Span , ty : Ty < ' tcx > ) -> ! {
484477 self . cx . handle_layout_err ( err, span, ty)
485478 }
486479}
487480
488481impl < ' tcx > FnAbiOfHelpers < ' tcx > for Builder < ' _ , ' _ , ' tcx > {
489- type FnAbiOfResult = & ' tcx FnAbi < ' tcx , Ty < ' tcx > > ;
490-
491482 #[ inline]
492483 fn handle_fn_abi_err (
493484 & self ,
@@ -531,6 +522,8 @@ fn set_rvalue_location<'a, 'gcc, 'tcx>(
531522}
532523
533524impl < ' a , ' gcc , ' tcx > BuilderMethods < ' a , ' tcx > for Builder < ' a , ' gcc , ' tcx > {
525+ type CodegenCx = CodegenCx < ' gcc , ' tcx > ;
526+
534527 fn build ( cx : & ' a CodegenCx < ' gcc , ' tcx > , block : Block < ' gcc > ) -> Builder < ' a , ' gcc , ' tcx > {
535528 Builder :: with_cx ( cx, block)
536529 }
0 commit comments