Add functions to DefId

This commit is contained in:
Aleksey Kladov 2018-12-04 23:44:00 +03:00
parent 947e3350e0
commit d8b0379e10
10 changed files with 90 additions and 83 deletions

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
use salsa::{self, Database};
use ra_db::{LocationIntener, BaseDatabase};
use hir::{self, DefId, DefLoc, FnId, SourceItemId};
use hir::{self, DefId, DefLoc};
use crate::{
symbol_index,
@ -15,7 +15,6 @@ pub(crate) struct RootDatabase {
#[derive(Debug, Default)]
struct IdMaps {
fns: LocationIntener<SourceItemId, FnId>,
defs: LocationIntener<DefLoc, DefId>,
}
@ -58,12 +57,6 @@ impl AsRef<LocationIntener<DefLoc, DefId>> for RootDatabase {
}
}
impl AsRef<LocationIntener<hir::SourceItemId, FnId>> for RootDatabase {
fn as_ref(&self) -> &LocationIntener<hir::SourceItemId, FnId> {
&self.id_maps.fns
}
}
salsa::database_storage! {
pub(crate) struct RootDatabaseStorage for RootDatabase {
impl ra_db::FilesDatabase {