Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/method_resolution.rs')
| -rw-r--r-- | crates/hir-ty/src/method_resolution.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/hir-ty/src/method_resolution.rs b/crates/hir-ty/src/method_resolution.rs index 73b07df56f..cd72349471 100644 --- a/crates/hir-ty/src/method_resolution.rs +++ b/crates/hir-ty/src/method_resolution.rs @@ -22,10 +22,10 @@ use triomphe::Arc; use crate::{ autoderef::{self, AutoderefKind}, db::HirDatabase, - from_chalk_trait_id, from_foreign_def_id, + error_lifetime, from_chalk_trait_id, from_foreign_def_id, infer::{unify::InferenceTable, Adjust, Adjustment, OverloadedDeref, PointerCast}, primitive::{FloatTy, IntTy, UintTy}, - static_lifetime, to_chalk_trait_id, + to_chalk_trait_id, utils::all_super_traits, AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, DynTyExt, ForeignDefId, Goal, Guidance, InEnvironment, Interner, Scalar, Solution, Substitution, TraitEnvironment, TraitRef, @@ -1035,7 +1035,7 @@ fn iterate_method_candidates_with_autoref( iterate_method_candidates_by_receiver(receiver_ty.clone(), maybe_reborrowed)?; let refed = Canonical { - value: TyKind::Ref(Mutability::Not, static_lifetime(), receiver_ty.value.clone()) + value: TyKind::Ref(Mutability::Not, error_lifetime(), receiver_ty.value.clone()) .intern(Interner), binders: receiver_ty.binders.clone(), }; @@ -1043,7 +1043,7 @@ fn iterate_method_candidates_with_autoref( iterate_method_candidates_by_receiver(refed, first_adjustment.with_autoref(Mutability::Not))?; let ref_muted = Canonical { - value: TyKind::Ref(Mutability::Mut, static_lifetime(), receiver_ty.value.clone()) + value: TyKind::Ref(Mutability::Mut, error_lifetime(), receiver_ty.value.clone()) .intern(Interner), binders: receiver_ty.binders, }; @@ -1369,6 +1369,7 @@ pub(crate) fn resolve_indexing_op( None } +// FIXME: Replace this with a `Try` impl once stable macro_rules! check_that { ($cond:expr) => { if !$cond { @@ -1377,6 +1378,7 @@ macro_rules! check_that { }; } +#[derive(Debug)] enum IsValidCandidate { Yes, No, |