mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
move ids to HIR
This commit is contained in:
parent
11168c464c
commit
f66e5b6e6b
10 changed files with 71 additions and 80 deletions
|
@ -5,9 +5,8 @@ use salsa::{self, Database};
|
|||
use ra_db::{LocationIntener, BaseDatabase};
|
||||
|
||||
use crate::{
|
||||
hir,
|
||||
hir::{self, DefId, DefLoc, FnId, SourceItemId},
|
||||
symbol_index,
|
||||
loc2id::{IdMaps, DefId, DefLoc, FnId},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -21,6 +20,12 @@ pub(crate) struct RootDatabase {
|
|||
id_maps: Arc<IdMaps>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
struct IdMaps {
|
||||
fns: LocationIntener<SourceItemId, FnId>,
|
||||
defs: LocationIntener<DefLoc, DefId>,
|
||||
}
|
||||
|
||||
impl salsa::Database for RootDatabase {
|
||||
fn salsa_runtime(&self) -> &salsa::Runtime<RootDatabase> {
|
||||
&self.runtime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue