aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/function
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/function')
-rw-r--r--crates/ra_hir/src/function/scope.rs12
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};
8use ra_arena::{Arena, RawId, impl_arena_id};
8use ra_db::LocalSyntaxPtr; 9use ra_db::LocalSyntaxPtr;
9 10
10use crate::{ 11use crate::{Name, AsName};
11 arena::{Arena, Id},
12 Name, AsName,
13};
14 12
15pub(crate) type ScopeId = Id<ScopeData>; 13#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
14pub struct ScopeId(RawId);
15impl_arena_id!(ScopeId);
16 16
17#[derive(Debug, PartialEq, Eq)] 17#[derive(Debug, PartialEq, Eq)]
18pub struct FnScopes { 18pub 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