1
Fork 0

Remove remap_env_constness in queries

This commit is contained in:
Deadbeef 2023-03-27 14:39:32 +00:00
parent 131211acd2
commit 954d9a8f8e
8 changed files with 25 additions and 69 deletions

View file

@ -32,14 +32,8 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
fn perform_query(
tcx: TyCtxt<'tcx>,
mut canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Self>>,
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Self>>,
) -> Fallible<CanonicalQueryResponse<'tcx, ()>> {
match canonicalized.value.value.predicate.kind().skip_binder() {
ty::PredicateKind::Clause(ty::Clause::Trait(pred)) => {
canonicalized.value.param_env.remap_constness_with(pred.constness);
}
_ => canonicalized.value.param_env = canonicalized.value.param_env.without_const(),
}
tcx.type_op_prove_predicate(canonicalized)
}
}