diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-04 19:28:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-04 19:28:34 +0000 |
commit | 8d5aa08712e782f22f04525f291ec74dae183568 (patch) | |
tree | 0e16a8e3a0a4e3be09569038ade2c43035309caf /crates/hir | |
parent | 571f247fbc48de8fcdda278242efb27c118193b2 (diff) | |
parent | b9d947cc6f6f93e138781da8a7be123436166fd5 (diff) |
Merge #6726
6726: Add slightly more profiling details r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/code_model.rs | 4 |
1 files changed, 3 insertions, 1 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) { |