aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/method_resolution.rs6
1 files changed, 3 insertions, 3 deletions
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::{
19 primitive::{self, FloatTy, IntTy, UintTy}, 19 primitive::{self, FloatTy, IntTy, UintTy},
20 utils::all_super_traits, 20 utils::all_super_traits,
21 Canonical, DebruijnIndex, FnPointer, FnSig, InEnvironment, Scalar, Substs, TraitEnvironment, 21 Canonical, DebruijnIndex, FnPointer, FnSig, InEnvironment, Scalar, Substs, TraitEnvironment,
22 TraitRef, Ty, TyKind, TypeWalk, 22 TraitRef, Ty, TypeWalk,
23}; 23};
24 24
25/// This is used as a key for indexing impls. 25/// This is used as a key for indexing impls.
@@ -667,7 +667,7 @@ pub(crate) fn inherent_impl_substs(
667 .build(); 667 .build();
668 let self_ty_with_vars = db.impl_self_ty(impl_id).subst(&vars); 668 let self_ty_with_vars = db.impl_self_ty(impl_id).subst(&vars);
669 let mut kinds = self_ty.kinds.to_vec(); 669 let mut kinds = self_ty.kinds.to_vec();
670 kinds.extend(iter::repeat(TyKind::General).take(vars.len())); 670 kinds.extend(iter::repeat(chalk_ir::TyVariableKind::General).take(vars.len()));
671 let tys = Canonical { kinds: kinds.into(), value: (self_ty_with_vars, self_ty.value.clone()) }; 671 let tys = Canonical { kinds: kinds.into(), value: (self_ty_with_vars, self_ty.value.clone()) };
672 let substs = super::infer::unify(&tys); 672 let substs = super::infer::unify(&tys);
673 // We only want the substs for the vars we added, not the ones from self_ty. 673 // We only want the substs for the vars we added, not the ones from self_ty.
@@ -759,7 +759,7 @@ fn generic_implements_goal(
759 .push(self_ty.value) 759 .push(self_ty.value)
760 .fill_with_bound_vars(DebruijnIndex::INNERMOST, kinds.len()) 760 .fill_with_bound_vars(DebruijnIndex::INNERMOST, kinds.len())
761 .build(); 761 .build();
762 kinds.extend(iter::repeat(TyKind::General).take(substs.len() - 1)); 762 kinds.extend(iter::repeat(chalk_ir::TyVariableKind::General).take(substs.len() - 1));
763 let trait_ref = TraitRef { trait_, substs }; 763 let trait_ref = TraitRef { trait_, substs };
764 let obligation = super::Obligation::Trait(trait_ref); 764 let obligation = super::Obligation::Trait(trait_ref);
765 Canonical { kinds: kinds.into(), value: InEnvironment::new(env, obligation) } 765 Canonical { kinds: kinds.into(), value: InEnvironment::new(env, obligation) }