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.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs
index 8b1717873..dd5109d4e 100644
--- a/crates/hir_ty/src/method_resolution.rs
+++ b/crates/hir_ty/src/method_resolution.rs
@@ -51,7 +51,7 @@ impl TyFingerprint {
51 &Ty::Scalar(scalar) => TyFingerprint::Scalar(scalar), 51 &Ty::Scalar(scalar) => TyFingerprint::Scalar(scalar),
52 &Ty::Adt(adt, _) => TyFingerprint::Adt(adt), 52 &Ty::Adt(adt, _) => TyFingerprint::Adt(adt),
53 &Ty::Tuple(cardinality, _) => TyFingerprint::Tuple(cardinality), 53 &Ty::Tuple(cardinality, _) => TyFingerprint::Tuple(cardinality),
54 &Ty::RawPtr(mutability, ..) => TyFingerprint::RawPtr(mutability), 54 &Ty::Raw(mutability, ..) => TyFingerprint::RawPtr(mutability),
55 &Ty::ForeignType(alias_id, ..) => TyFingerprint::ForeignType(alias_id), 55 &Ty::ForeignType(alias_id, ..) => TyFingerprint::ForeignType(alias_id),
56 &Ty::Function(FnPointer { num_args, sig, .. }) => TyFingerprint::FnPtr(num_args, sig), 56 &Ty::Function(FnPointer { num_args, sig, .. }) => TyFingerprint::FnPtr(num_args, sig),
57 Ty::Dyn(_) => ty.dyn_trait().map(|trait_| TyFingerprint::Dyn(trait_))?, 57 Ty::Dyn(_) => ty.dyn_trait().map(|trait_| TyFingerprint::Dyn(trait_))?,
@@ -251,8 +251,8 @@ impl Ty {
251 } 251 }
252 Ty::Str => lang_item_crate!("str_alloc", "str"), 252 Ty::Str => lang_item_crate!("str_alloc", "str"),
253 Ty::Slice(_) => lang_item_crate!("slice_alloc", "slice"), 253 Ty::Slice(_) => lang_item_crate!("slice_alloc", "slice"),
254 Ty::RawPtr(Mutability::Shared, _) => lang_item_crate!("const_ptr"), 254 Ty::Raw(Mutability::Shared, _) => lang_item_crate!("const_ptr"),
255 Ty::RawPtr(Mutability::Mut, _) => lang_item_crate!("mut_ptr"), 255 Ty::Raw(Mutability::Mut, _) => lang_item_crate!("mut_ptr"),
256 Ty::Dyn(_) => { 256 Ty::Dyn(_) => {
257 return self.dyn_trait().and_then(|trait_| { 257 return self.dyn_trait().and_then(|trait_| {
258 mod_to_crate_ids(GenericDefId::TraitId(trait_).module(db.upcast())) 258 mod_to_crate_ids(GenericDefId::TraitId(trait_).module(db.upcast()))
@@ -683,7 +683,7 @@ pub(crate) fn inherent_impl_substs(
683fn fallback_bound_vars(s: Substs, num_vars_to_keep: usize) -> Substs { 683fn fallback_bound_vars(s: Substs, num_vars_to_keep: usize) -> Substs {
684 s.fold_binders( 684 s.fold_binders(
685 &mut |ty, binders| { 685 &mut |ty, binders| {
686 if let Ty::Bound(bound) = &ty { 686 if let Ty::BoundVar(bound) = &ty {
687 if bound.index >= num_vars_to_keep && bound.debruijn >= binders { 687 if bound.index >= num_vars_to_keep && bound.debruijn >= binders {
688 Ty::Unknown 688 Ty::Unknown
689 } else { 689 } else {