Skip to content

Commit 3390e73

Browse files
We need to go deeper
1 parent d1fc9d7 commit 3390e73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/hir_ty/src/autoderef.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ fn deref_by_trait(
5858
krate: CrateId,
5959
ty: InEnvironment<&Canonical<Ty>>,
6060
) -> Option<Canonical<Ty>> {
61+
let _p = profile::span("deref_by_trait");
6162
let deref_trait = match db.lang_item(krate, "deref".into())? {
6263
LangItemTarget::TraitId(it) => it,
6364
_ => return None,
@@ -85,7 +86,10 @@ fn deref_by_trait(
8586
environment: ty.environment.clone(),
8687
},
8788
};
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+
} {
8993
return None;
9094
}
9195

0 commit comments

Comments
 (0)