aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/semantics
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-12 15:32:36 +0100
committerAleksey Kladov <[email protected]>2020-08-12 15:35:29 +0100
commit208b7bd7ba687fb570feb1b89219f14c63712ce8 (patch)
treec39749d1b71b73b4017c2d0d848ebdc85e570c39 /crates/ra_hir/src/semantics
parent98baa9b569b49162392ed4149dd435854fe941b8 (diff)
Rename ra_prof -> profile
Diffstat (limited to 'crates/ra_hir/src/semantics')
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs
index 863e8e5ff..a6ff8b0bf 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -10,7 +10,6 @@ use hir_def::{
10}; 10};
11use hir_expand::{name::AsName, AstId, MacroDefKind}; 11use hir_expand::{name::AsName, AstId, MacroDefKind};
12use ra_db::FileId; 12use ra_db::FileId;
13use ra_prof::profile;
14use ra_syntax::{ 13use ra_syntax::{
15 ast::{self, NameOwner}, 14 ast::{self, NameOwner},
16 match_ast, AstNode, SyntaxNode, 15 match_ast, AstNode, SyntaxNode,
@@ -29,7 +28,7 @@ pub(super) struct SourceToDefCtx<'a, 'b> {
29 28
30impl SourceToDefCtx<'_, '_> { 29impl SourceToDefCtx<'_, '_> {
31 pub(super) fn file_to_def(&mut self, file: FileId) -> Option<ModuleId> { 30 pub(super) fn file_to_def(&mut self, file: FileId) -> Option<ModuleId> {
32 let _p = profile("SourceBinder::to_module_def"); 31 let _p = profile::span("SourceBinder::to_module_def");
33 let (krate, local_id) = self.db.relevant_crates(file).iter().find_map(|&crate_id| { 32 let (krate, local_id) = self.db.relevant_crates(file).iter().find_map(|&crate_id| {
34 let crate_def_map = self.db.crate_def_map(crate_id); 33 let crate_def_map = self.db.crate_def_map(crate_id);
35 let local_id = crate_def_map.modules_for_file(file).next()?; 34 let local_id = crate_def_map.modules_for_file(file).next()?;
@@ -39,7 +38,7 @@ impl SourceToDefCtx<'_, '_> {
39 } 38 }
40 39
41 pub(super) fn module_to_def(&mut self, src: InFile<ast::Module>) -> Option<ModuleId> { 40 pub(super) fn module_to_def(&mut self, src: InFile<ast::Module>) -> Option<ModuleId> {
42 let _p = profile("module_to_def"); 41 let _p = profile::span("module_to_def");
43 let parent_declaration = src 42 let parent_declaration = src
44 .as_ref() 43 .as_ref()
45 .map(|it| it.syntax()) 44 .map(|it| it.syntax())