aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/hir/src/code_model.rs4
-rw-r--r--crates/ide_db/src/defs.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 4500050f1..9a1e9ba49 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -362,7 +362,9 @@ impl Module {
362 } 362 }
363 363
364 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { 364 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
365 let _p = profile::span("Module::diagnostics"); 365 let _p = profile::span("Module::diagnostics").detail(|| {
366 format!("{:?}", self.name(db).map_or("<unknown>".into(), |name| name.to_string()))
367 });
366 let crate_def_map = db.crate_def_map(self.id.krate); 368 let crate_def_map = db.crate_def_map(self.id.krate);
367 crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink); 369 crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink);
368 for decl in self.declarations(db) { 370 for decl in self.declarations(db) {
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs
index 201a3d6fa..5d2cd30d1 100644
--- a/crates/ide_db/src/defs.rs
+++ b/crates/ide_db/src/defs.rs
@@ -258,7 +258,7 @@ impl NameRefClass {
258 sema: &Semantics<RootDatabase>, 258 sema: &Semantics<RootDatabase>,
259 name_ref: &ast::NameRef, 259 name_ref: &ast::NameRef,
260 ) -> Option<NameRefClass> { 260 ) -> Option<NameRefClass> {
261 let _p = profile::span("classify_name_ref"); 261 let _p = profile::span("classify_name_ref").detail(|| name_ref.to_string());
262 262
263 let parent = name_ref.syntax().parent()?; 263 let parent = name_ref.syntax().parent()?;
264 264