mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
encapsulate hir locations
This commit is contained in:
parent
6a0a4a564a
commit
9fe09db771
7 changed files with 45 additions and 74 deletions
|
@ -1,5 +1,5 @@
|
|||
use ra_db::{
|
||||
LocationIntener, SourceFileQuery,
|
||||
SourceFileQuery,
|
||||
salsa::{Database, debug::DebugQueryTable},
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@ use crate::db::RootDatabase;
|
|||
pub(crate) fn status(db: &RootDatabase) -> String {
|
||||
let n_parsed_files = db.query(SourceFileQuery).keys::<Vec<_>>().len();
|
||||
let n_defs = {
|
||||
let interner: &LocationIntener<hir::DefLoc, hir::DefId> = db.as_ref();
|
||||
let interner: &hir::HirInterner = db.as_ref();
|
||||
interner.len()
|
||||
};
|
||||
format!("#n_parsed_files {}\n#n_defs {}\n", n_parsed_files, n_defs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue