From 11a1f13cd1cf6da484fd4b8bfb5f72a625c2186a Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 1 Mar 2021 12:35:11 +0100 Subject: Being Ty::InferenceVar closes to chalk equivalent --- crates/hir_ty/src/method_resolution.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/method_resolution.rs') diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index c8a0ad5f1..8b1717873 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs @@ -19,7 +19,7 @@ use crate::{ primitive::{self, FloatTy, IntTy, UintTy}, utils::all_super_traits, Canonical, DebruijnIndex, FnPointer, FnSig, InEnvironment, Scalar, Substs, TraitEnvironment, - TraitRef, Ty, TyKind, TypeWalk, + TraitRef, Ty, TypeWalk, }; /// This is used as a key for indexing impls. @@ -667,7 +667,7 @@ pub(crate) fn inherent_impl_substs( .build(); let self_ty_with_vars = db.impl_self_ty(impl_id).subst(&vars); let mut kinds = self_ty.kinds.to_vec(); - kinds.extend(iter::repeat(TyKind::General).take(vars.len())); + kinds.extend(iter::repeat(chalk_ir::TyVariableKind::General).take(vars.len())); let tys = Canonical { kinds: kinds.into(), value: (self_ty_with_vars, self_ty.value.clone()) }; let substs = super::infer::unify(&tys); // We only want the substs for the vars we added, not the ones from self_ty. @@ -759,7 +759,7 @@ fn generic_implements_goal( .push(self_ty.value) .fill_with_bound_vars(DebruijnIndex::INNERMOST, kinds.len()) .build(); - kinds.extend(iter::repeat(TyKind::General).take(substs.len() - 1)); + kinds.extend(iter::repeat(chalk_ir::TyVariableKind::General).take(substs.len() - 1)); let trait_ref = TraitRef { trait_, substs }; let obligation = super::Obligation::Trait(trait_ref); Canonical { kinds: kinds.into(), value: InEnvironment::new(env, obligation) } -- cgit v1.2.3