1
Fork 0

Basic removal of Ty from places (boring)

This commit is contained in:
Boxy 2024-06-03 01:10:24 +01:00
parent 7ebd2bdbf6
commit 58feec9b85
71 changed files with 331 additions and 581 deletions

View file

@ -58,8 +58,7 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> TypeFolder<I> for EagerRes
fn fold_const(&mut self, c: I::Const) -> I::Const {
match c.kind() {
ty::ConstKind::Infer(ty::InferConst::Var(vid)) => {
let ty = c.ty().fold_with(self);
let resolved = self.infcx.opportunistic_resolve_ct_var(vid, ty);
let resolved = self.infcx.opportunistic_resolve_ct_var(vid);
if c != resolved && resolved.has_infer() {
resolved.fold_with(self)
} else {
@ -67,9 +66,7 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> TypeFolder<I> for EagerRes
}
}
ty::ConstKind::Infer(ty::InferConst::EffectVar(vid)) => {
let bool = Ty::new_bool(self.infcx.interner());
debug_assert_eq!(c.ty(), bool);
self.infcx.opportunistic_resolve_effect_var(vid, bool)
self.infcx.opportunistic_resolve_effect_var(vid)
}
_ => {
if c.has_infer() {