aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/Cargo.toml1
-rw-r--r--crates/ra_hir/src/nameres.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml
index 501308acc..a2858dad9 100644
--- a/crates/ra_hir/Cargo.toml
+++ b/crates/ra_hir/Cargo.toml
@@ -19,6 +19,7 @@ ra_db = { path = "../ra_db" }
19mbe = { path = "../ra_mbe", package = "ra_mbe" } 19mbe = { path = "../ra_mbe", package = "ra_mbe" }
20tt = { path = "../ra_tt", package = "ra_tt" } 20tt = { path = "../ra_tt", package = "ra_tt" }
21test_utils = { path = "../test_utils" } 21test_utils = { path = "../test_utils" }
22ra_prof = {path = "../ra_prof" }
22 23
23[dev-dependencies] 24[dev-dependencies]
24flexi_logger = "0.11.0" 25flexi_logger = "0.11.0"
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index 67b9d6986..8adc6d368 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -60,6 +60,7 @@ use ra_arena::{Arena, RawId, impl_arena_id};
60use ra_db::{FileId, Edition}; 60use ra_db::{FileId, Edition};
61use test_utils::tested_by; 61use test_utils::tested_by;
62use ra_syntax::ast; 62use ra_syntax::ast;
63use ra_prof::profile;
63 64
64use crate::{ 65use crate::{
65 ModuleDef, Name, Crate, Module, 66 ModuleDef, Name, Crate, Module,
@@ -178,7 +179,7 @@ enum ReachedFixedPoint {
178 179
179impl CrateDefMap { 180impl CrateDefMap {
180 pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: Crate) -> Arc<CrateDefMap> { 181 pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: Crate) -> Arc<CrateDefMap> {
181 let start = std::time::Instant::now(); 182 let _p = profile("crate_def_map_query");
182 let def_map = { 183 let def_map = {
183 let edition = krate.edition(db); 184 let edition = krate.edition(db);
184 let mut modules: Arena<CrateModuleId, ModuleData> = Arena::default(); 185 let mut modules: Arena<CrateModuleId, ModuleData> = Arena::default();
@@ -195,7 +196,6 @@ impl CrateDefMap {
195 } 196 }
196 }; 197 };
197 let def_map = collector::collect_defs(db, def_map); 198 let def_map = collector::collect_defs(db, def_map);
198 log::info!("crate_def_map_query: {:?}", start.elapsed());
199 Arc::new(def_map) 199 Arc::new(def_map)
200 } 200 }
201 201