convert some GenericArg to Term

This commit is contained in:
lcnr
2025-04-26 01:54:09 +00:00
parent e3e432d4d6
commit 855035b038
27 changed files with 180 additions and 154 deletions

View File

@@ -533,8 +533,8 @@ where
ty::PredicateKind::DynCompatible(trait_def_id) => {
self.compute_dyn_compatible_goal(trait_def_id)
}
ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) => {
self.compute_well_formed_goal(Goal { param_env, predicate: arg })
ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(term)) => {
self.compute_well_formed_goal(Goal { param_env, predicate: term })
}
ty::PredicateKind::Clause(ty::ClauseKind::ConstEvaluatable(ct)) => {
self.compute_const_evaluatable_goal(Goal { param_env, predicate: ct })
@@ -1012,9 +1012,9 @@ where
pub(super) fn well_formed_goals(
&self,
param_env: I::ParamEnv,
arg: I::GenericArg,
term: I::Term,
) -> Option<Vec<Goal<I, I::Predicate>>> {
self.delegate.well_formed_goals(param_env, arg)
self.delegate.well_formed_goals(param_env, term)
}
pub(super) fn trait_ref_is_knowable(

View File

@@ -126,7 +126,7 @@ where
}
#[instrument(level = "trace", skip(self))]
fn compute_well_formed_goal(&mut self, goal: Goal<I, I::GenericArg>) -> QueryResult<I> {
fn compute_well_formed_goal(&mut self, goal: Goal<I, I::Term>) -> QueryResult<I> {
match self.well_formed_goals(goal.param_env, goal.predicate) {
Some(goals) => {
self.add_goals(GoalSource::Misc, goals);