diff options
author | Aleksey Kladov <[email protected]> | 2019-11-24 18:00:50 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-24 18:00:50 +0000 |
commit | d87c16bea60f4972b0adf4dd69bbb9abcfca12d6 (patch) | |
tree | 3b5586ecec55e568c6be0ad259c90313053ffd2f /crates | |
parent | e48430cbae32249e50dda1b39e0c98a31f118250 (diff) |
hir_def is fully doc'ed!
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_def/src/body/scope.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/per_ns.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir_def/src/resolver.rs | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index 5240a59d5..625aa39dd 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! Name resolution for expressions. |
2 | use std::sync::Arc; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use hir_expand::name::Name; | 4 | use hir_expand::name::Name; |
diff --git a/crates/ra_hir_def/src/per_ns.rs b/crates/ra_hir_def/src/per_ns.rs index 06ef6c9fc..00e866bf9 100644 --- a/crates/ra_hir_def/src/per_ns.rs +++ b/crates/ra_hir_def/src/per_ns.rs | |||
@@ -1,4 +1,7 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! In rust, it is possible to have a value, a type and a macro with the same |
2 | //! name without conflicts. | ||
3 | //! | ||
4 | //! `PerNs` (per namespace) captures this. | ||
2 | 5 | ||
3 | use hir_expand::MacroDefId; | 6 | use hir_expand::MacroDefId; |
4 | 7 | ||
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs index c24a9b165..1f8887c6b 100644 --- a/crates/ra_hir_def/src/resolver.rs +++ b/crates/ra_hir_def/src/resolver.rs | |||
@@ -29,20 +29,20 @@ pub struct Resolver { | |||
29 | 29 | ||
30 | // FIXME how to store these best | 30 | // FIXME how to store these best |
31 | #[derive(Debug, Clone)] | 31 | #[derive(Debug, Clone)] |
32 | pub(crate) struct ModuleItemMap { | 32 | struct ModuleItemMap { |
33 | crate_def_map: Arc<CrateDefMap>, | 33 | crate_def_map: Arc<CrateDefMap>, |
34 | module_id: LocalModuleId, | 34 | module_id: LocalModuleId, |
35 | } | 35 | } |
36 | 36 | ||
37 | #[derive(Debug, Clone)] | 37 | #[derive(Debug, Clone)] |
38 | pub(crate) struct ExprScope { | 38 | struct ExprScope { |
39 | owner: DefWithBodyId, | 39 | owner: DefWithBodyId, |
40 | expr_scopes: Arc<ExprScopes>, | 40 | expr_scopes: Arc<ExprScopes>, |
41 | scope_id: ScopeId, | 41 | scope_id: ScopeId, |
42 | } | 42 | } |
43 | 43 | ||
44 | #[derive(Debug, Clone)] | 44 | #[derive(Debug, Clone)] |
45 | pub(crate) enum Scope { | 45 | enum Scope { |
46 | /// All the items and imported names of a module | 46 | /// All the items and imported names of a module |
47 | ModuleScope(ModuleItemMap), | 47 | ModuleScope(ModuleItemMap), |
48 | /// Brings the generic parameters of an item into scope | 48 | /// Brings the generic parameters of an item into scope |