mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
remove id arena
This commit is contained in:
parent
291d578938
commit
3fe6f422f9
8 changed files with 26 additions and 94 deletions
|
@ -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>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue