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.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs
index 6d65d3eb9..436dea22b 100644
--- a/crates/hir_ty/src/method_resolution.rs
+++ b/crates/hir_ty/src/method_resolution.rs
@@ -19,6 +19,7 @@ use crate::{
19 db::HirDatabase, 19 db::HirDatabase,
20 from_foreign_def_id, 20 from_foreign_def_id,
21 primitive::{self, FloatTy, IntTy, UintTy}, 21 primitive::{self, FloatTy, IntTy, UintTy},
22 static_lifetime,
22 utils::all_super_traits, 23 utils::all_super_traits,
23 AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, FnPointer, FnSig, ForeignDefId, 24 AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, FnPointer, FnSig, ForeignDefId,
24 InEnvironment, Interner, Scalar, Substitution, TraitEnvironment, Ty, TyBuilder, TyKind, 25 InEnvironment, Interner, Scalar, Substitution, TraitEnvironment, Ty, TyBuilder, TyKind,
@@ -453,7 +454,8 @@ fn iterate_method_candidates_with_autoref(
453 } 454 }
454 let refed = Canonical { 455 let refed = Canonical {
455 binders: deref_chain[0].binders.clone(), 456 binders: deref_chain[0].binders.clone(),
456 value: TyKind::Ref(Mutability::Not, deref_chain[0].value.clone()).intern(&Interner), 457 value: TyKind::Ref(Mutability::Not, static_lifetime(), deref_chain[0].value.clone())
458 .intern(&Interner),
457 }; 459 };
458 if iterate_method_candidates_by_receiver( 460 if iterate_method_candidates_by_receiver(
459 &refed, 461 &refed,
@@ -470,7 +472,8 @@ fn iterate_method_candidates_with_autoref(
470 } 472 }
471 let ref_muted = Canonical { 473 let ref_muted = Canonical {
472 binders: deref_chain[0].binders.clone(), 474 binders: deref_chain[0].binders.clone(),
473 value: TyKind::Ref(Mutability::Mut, deref_chain[0].value.clone()).intern(&Interner), 475 value: TyKind::Ref(Mutability::Mut, static_lifetime(), deref_chain[0].value.clone())
476 .intern(&Interner),
474 }; 477 };
475 if iterate_method_candidates_by_receiver( 478 if iterate_method_candidates_by_receiver(
476 &ref_muted, 479 &ref_muted,