@@ -2804,16 +2804,6 @@ where
2804
2804
/// NB: that includes virtual calls, which are represented by "direct calls"
2805
2805
/// to an `InstanceDef::Virtual` instance (of `<dyn Trait as Trait>::fn`).
2806
2806
fn of_instance ( cx : & C , instance : ty:: Instance < ' tcx > , extra_args : & [ Ty < ' tcx > ] ) -> Self ;
2807
-
2808
- fn new_internal (
2809
- cx : & C ,
2810
- sig : ty:: PolyFnSig < ' tcx > ,
2811
- extra_args : & [ Ty < ' tcx > ] ,
2812
- caller_location : Option < Ty < ' tcx > > ,
2813
- codegen_fn_attr_flags : CodegenFnAttrFlags ,
2814
- make_self_ptr_thin : bool ,
2815
- ) -> Self ;
2816
- fn adjust_for_abi ( & mut self , cx : & C , abi : SpecAbi ) ;
2817
2807
}
2818
2808
2819
2809
impl < ' tcx , C > FnAbiExt < ' tcx , C > for call:: FnAbi < ' tcx , Ty < ' tcx > >
@@ -2844,7 +2834,28 @@ where
2844
2834
matches ! ( instance. def, ty:: InstanceDef :: Virtual ( ..) ) ,
2845
2835
)
2846
2836
}
2837
+ }
2838
+
2839
+ /// Implementation detail of computing `FnAbi`s, shouldn't be exported.
2840
+ trait FnAbiInternalExt < ' tcx , C >
2841
+ where
2842
+ C : LayoutOf < ' tcx , LayoutOfResult = TyAndLayout < ' tcx > > + HasTargetSpec ,
2843
+ {
2844
+ fn new_internal (
2845
+ cx : & C ,
2846
+ sig : ty:: PolyFnSig < ' tcx > ,
2847
+ extra_args : & [ Ty < ' tcx > ] ,
2848
+ caller_location : Option < Ty < ' tcx > > ,
2849
+ codegen_fn_attr_flags : CodegenFnAttrFlags ,
2850
+ make_self_ptr_thin : bool ,
2851
+ ) -> Self ;
2852
+ fn adjust_for_abi ( & mut self , cx : & C , abi : SpecAbi ) ;
2853
+ }
2847
2854
2855
+ impl < ' tcx , C > FnAbiInternalExt < ' tcx , C > for call:: FnAbi < ' tcx , Ty < ' tcx > >
2856
+ where
2857
+ C : LayoutOf < ' tcx , LayoutOfResult = TyAndLayout < ' tcx > > + HasTargetSpec ,
2858
+ {
2848
2859
fn new_internal (
2849
2860
cx : & C ,
2850
2861
sig : ty:: PolyFnSig < ' tcx > ,
0 commit comments