From 75a2605361e497cdb6f8c8a4056a6ecd1e35ad68 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 14 Apr 2021 17:15:37 +0300 Subject: Better places for spans --- crates/hir_ty/src/autoderef.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/hir_ty/src/autoderef.rs') diff --git a/crates/hir_ty/src/autoderef.rs b/crates/hir_ty/src/autoderef.rs index eae0ad949..6d2cf4619 100644 --- a/crates/hir_ty/src/autoderef.rs +++ b/crates/hir_ty/src/autoderef.rs @@ -24,10 +24,8 @@ pub fn autoderef<'a>( krate: Option, ty: InEnvironment>, ) -> impl Iterator> + 'a { - let _p = profile::span("autoderef"); let InEnvironment { goal: ty, environment } = ty; successors(Some(ty), move |ty| { - let _p = profile::span("autoderef.step"); deref(db, krate?, InEnvironment { goal: ty, environment: environment.clone() }) }) .take(AUTODEREF_RECURSION_LIMIT) @@ -38,6 +36,7 @@ pub(crate) fn deref( krate: CrateId, ty: InEnvironment<&Canonical>, ) -> Option> { + let _p = profile::span("deref"); if let Some(derefed) = builtin_deref(&ty.goal.value) { Some(Canonical { value: derefed, binders: ty.goal.binders.clone() }) } else { -- cgit v1.2.3