s/const_effect/host_effect
This commit is contained in:
parent
f1bf874fb1
commit
7467c3a45c
5 changed files with 10 additions and 9 deletions
|
@ -782,7 +782,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
|| self.extern_crate(key.as_def_id()).is_some_and(|e| e.is_direct())
|
||||
}
|
||||
|
||||
pub fn expected_const_effect_param_for_body(self, def_id: LocalDefId) -> ty::Const<'tcx> {
|
||||
pub fn expected_host_effect_param_for_body(self, def_id: LocalDefId) -> ty::Const<'tcx> {
|
||||
// FIXME(effects): This is suspicious and should probably not be done,
|
||||
// especially now that we enforce host effects and then properly handle
|
||||
// effect vars during fallback.
|
||||
|
@ -817,7 +817,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
}
|
||||
|
||||
/// Constructs generic args for an item, optionally appending a const effect param type
|
||||
pub fn with_opt_const_effect_param(
|
||||
pub fn with_opt_host_effect_param(
|
||||
self,
|
||||
caller_def_id: LocalDefId,
|
||||
callee_def_id: DefId,
|
||||
|
@ -826,9 +826,10 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
let generics = self.generics_of(callee_def_id);
|
||||
assert_eq!(generics.parent, None);
|
||||
|
||||
let opt_const_param = generics.host_effect_index.is_some().then(|| {
|
||||
ty::GenericArg::from(self.expected_const_effect_param_for_body(caller_def_id))
|
||||
});
|
||||
let opt_const_param = generics
|
||||
.host_effect_index
|
||||
.is_some()
|
||||
.then(|| ty::GenericArg::from(self.expected_host_effect_param_for_body(caller_def_id)));
|
||||
|
||||
self.mk_args_from_iter(args.into_iter().map(|arg| arg.into()).chain(opt_const_param))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue