mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-08 05:47:40 +00:00
Merge #6726
6726: Add slightly more profiling details r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
8d5aa08712
@ -362,7 +362,9 @@ impl Module {
|
||||
}
|
||||
|
||||
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
|
||||
let _p = profile::span("Module::diagnostics");
|
||||
let _p = profile::span("Module::diagnostics").detail(|| {
|
||||
format!("{:?}", self.name(db).map_or("<unknown>".into(), |name| name.to_string()))
|
||||
});
|
||||
let crate_def_map = db.crate_def_map(self.id.krate);
|
||||
crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink);
|
||||
for decl in self.declarations(db) {
|
||||
|
@ -258,7 +258,7 @@ impl NameRefClass {
|
||||
sema: &Semantics<RootDatabase>,
|
||||
name_ref: &ast::NameRef,
|
||||
) -> Option<NameRefClass> {
|
||||
let _p = profile::span("classify_name_ref");
|
||||
let _p = profile::span("classify_name_ref").detail(|| name_ref.to_string());
|
||||
|
||||
let parent = name_ref.syntax().parent()?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user