aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/src/autoderef.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir_ty/src/autoderef.rs b/crates/hir_ty/src/autoderef.rs
index 7afa2d5ce..eae0ad949 100644
--- a/crates/hir_ty/src/autoderef.rs
+++ b/crates/hir_ty/src/autoderef.rs
@@ -58,6 +58,7 @@ fn deref_by_trait(
58 krate: CrateId, 58 krate: CrateId,
59 ty: InEnvironment<&Canonical<Ty>>, 59 ty: InEnvironment<&Canonical<Ty>>,
60) -> Option<Canonical<Ty>> { 60) -> Option<Canonical<Ty>> {
61 let _p = profile::span("deref_by_trait");
61 let deref_trait = match db.lang_item(krate, "deref".into())? { 62 let deref_trait = match db.lang_item(krate, "deref".into())? {
62 LangItemTarget::TraitId(it) => it, 63 LangItemTarget::TraitId(it) => it,
63 _ => return None, 64 _ => return None,
@@ -85,7 +86,10 @@ fn deref_by_trait(
85 environment: ty.environment.clone(), 86 environment: ty.environment.clone(),
86 }, 87 },
87 }; 88 };
88 if db.trait_solve(krate, implements_goal).is_none() { 89 if {
90 let _p = profile::span("db.trait_solve");
91 db.trait_solve(krate, implements_goal).is_none()
92 } {
89 return None; 93 return None;
90 } 94 }
91 95