diff options
Diffstat (limited to 'crates/ra_hir/src/function')
-rw-r--r-- | crates/ra_hir/src/function/scope.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/function/scope.rs b/crates/ra_hir/src/function/scope.rs index 3e4cfad0c..42bfe4f32 100644 --- a/crates/ra_hir/src/function/scope.rs +++ b/crates/ra_hir/src/function/scope.rs | |||
@@ -5,19 +5,19 @@ use ra_syntax::{ | |||
5 | algo::generate, | 5 | algo::generate, |
6 | ast::{self, ArgListOwner, LoopBodyOwner, NameOwner}, | 6 | ast::{self, ArgListOwner, LoopBodyOwner, NameOwner}, |
7 | }; | 7 | }; |
8 | use ra_arena::{Arena, RawId, impl_arena_id}; | ||
8 | use ra_db::LocalSyntaxPtr; | 9 | use ra_db::LocalSyntaxPtr; |
9 | 10 | ||
10 | use crate::{ | 11 | use crate::{Name, AsName}; |
11 | arena::{Arena, Id}, | ||
12 | Name, AsName, | ||
13 | }; | ||
14 | 12 | ||
15 | pub(crate) type ScopeId = Id<ScopeData>; | 13 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
14 | pub struct ScopeId(RawId); | ||
15 | impl_arena_id!(ScopeId); | ||
16 | 16 | ||
17 | #[derive(Debug, PartialEq, Eq)] | 17 | #[derive(Debug, PartialEq, Eq)] |
18 | pub struct FnScopes { | 18 | pub struct FnScopes { |
19 | pub self_param: Option<LocalSyntaxPtr>, | 19 | pub self_param: Option<LocalSyntaxPtr>, |
20 | scopes: Arena<ScopeData>, | 20 | scopes: Arena<ScopeId, ScopeData>, |
21 | scope_for: FxHashMap<LocalSyntaxPtr, ScopeId>, | 21 | scope_for: FxHashMap<LocalSyntaxPtr, ScopeId>, |
22 | } | 22 | } |
23 | 23 | ||