aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-24 18:00:50 +0000
committerAleksey Kladov <[email protected]>2019-11-24 18:00:50 +0000
commitd87c16bea60f4972b0adf4dd69bbb9abcfca12d6 (patch)
tree3b5586ecec55e568c6be0ad259c90313053ffd2f /crates/ra_hir_def
parente48430cbae32249e50dda1b39e0c98a31f118250 (diff)
hir_def is fully doc'ed!
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/body/scope.rs2
-rw-r--r--crates/ra_hir_def/src/per_ns.rs5
-rw-r--r--crates/ra_hir_def/src/resolver.rs6
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.
2use std::sync::Arc; 2use std::sync::Arc;
3 3
4use hir_expand::name::Name; 4use 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
3use hir_expand::MacroDefId; 6use 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)]
32pub(crate) struct ModuleItemMap { 32struct 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)]
38pub(crate) struct ExprScope { 38struct 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)]
45pub(crate) enum Scope { 45enum 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