remove id arena

This commit is contained in:
Aleksey Kladov 2019-01-04 16:15:50 +03:00
parent 291d578938
commit 3fe6f422f9
8 changed files with 26 additions and 94 deletions

View file

@ -5,19 +5,19 @@ use ra_syntax::{
algo::generate,
ast::{self, ArgListOwner, LoopBodyOwner, NameOwner},
};
use ra_arena::{Arena, RawId, impl_arena_id};
use ra_db::LocalSyntaxPtr;
use crate::{
arena::{Arena, Id},
Name, AsName,
};
use crate::{Name, AsName};
pub(crate) type ScopeId = Id<ScopeData>;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ScopeId(RawId);
impl_arena_id!(ScopeId);
#[derive(Debug, PartialEq, Eq)]
pub struct FnScopes {
pub self_param: Option<LocalSyntaxPtr>,
scopes: Arena<ScopeData>,
scopes: Arena<ScopeId, ScopeData>,
scope_for: FxHashMap<LocalSyntaxPtr, ScopeId>,
}