diff options
Diffstat (limited to 'crates/ra_hir_def/src/body/scope.rs')
-rw-r--r-- | crates/ra_hir_def/src/body/scope.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index 7c3db8869..4d489f692 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | use std::sync::Arc; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use hir_expand::name::Name; | 4 | use hir_expand::name::Name; |
5 | use ra_arena::{impl_arena_id, Arena, RawId}; | 5 | use ra_arena::{Arena, Idx}; |
6 | use rustc_hash::FxHashMap; | 6 | use rustc_hash::FxHashMap; |
7 | 7 | ||
8 | use crate::{ | 8 | use crate::{ |
@@ -12,13 +12,11 @@ use crate::{ | |||
12 | DefWithBodyId, | 12 | DefWithBodyId, |
13 | }; | 13 | }; |
14 | 14 | ||
15 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | 15 | pub type ScopeId = Idx<ScopeData>; |
16 | pub struct ScopeId(RawId); | ||
17 | impl_arena_id!(ScopeId); | ||
18 | 16 | ||
19 | #[derive(Debug, PartialEq, Eq)] | 17 | #[derive(Debug, PartialEq, Eq)] |
20 | pub struct ExprScopes { | 18 | pub struct ExprScopes { |
21 | scopes: Arena<ScopeId, ScopeData>, | 19 | scopes: Arena<ScopeData>, |
22 | scope_by_expr: FxHashMap<ExprId, ScopeId>, | 20 | scope_by_expr: FxHashMap<ExprId, ScopeId>, |
23 | } | 21 | } |
24 | 22 | ||