@@ -782,7 +782,7 @@ impl<'tcx> TyCtxt<'tcx> {
782
782
|| self . extern_crate ( key. as_def_id ( ) ) . is_some_and ( |e| e. is_direct ( ) )
783
783
}
784
784
785
- pub fn expected_const_effect_param_for_body ( self , def_id : LocalDefId ) -> ty:: Const < ' tcx > {
785
+ pub fn expected_host_effect_param_for_body ( self , def_id : LocalDefId ) -> ty:: Const < ' tcx > {
786
786
// FIXME(effects): This is suspicious and should probably not be done,
787
787
// especially now that we enforce host effects and then properly handle
788
788
// effect vars during fallback.
@@ -817,7 +817,7 @@ impl<'tcx> TyCtxt<'tcx> {
817
817
}
818
818
819
819
/// Constructs generic args for an item, optionally appending a const effect param type
820
- pub fn with_opt_const_effect_param (
820
+ pub fn with_opt_host_effect_param (
821
821
self ,
822
822
caller_def_id : LocalDefId ,
823
823
callee_def_id : DefId ,
@@ -826,9 +826,10 @@ impl<'tcx> TyCtxt<'tcx> {
826
826
let generics = self . generics_of ( callee_def_id) ;
827
827
assert_eq ! ( generics. parent, None ) ;
828
828
829
- let opt_const_param = generics. host_effect_index . is_some ( ) . then ( || {
830
- ty:: GenericArg :: from ( self . expected_const_effect_param_for_body ( caller_def_id) )
831
- } ) ;
829
+ let opt_const_param = generics
830
+ . host_effect_index
831
+ . is_some ( )
832
+ . then ( || ty:: GenericArg :: from ( self . expected_host_effect_param_for_body ( caller_def_id) ) ) ;
832
833
833
834
self . mk_args_from_iter ( args. into_iter ( ) . map ( |arg| arg. into ( ) ) . chain ( opt_const_param) )
834
835
}
0 commit comments