aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-24 18:18:47 +0000
committerGitHub <[email protected]>2019-11-24 18:18:47 +0000
commit09389ed1d43c244352cecbd78c8685480d60157d (patch)
tree047d256c33567aa3dfb59e7986f7059bf99ffb6b /crates/ra_hir_def
parent64fc9ac9650afb04a353ba8a18381f0db83cbc82 (diff)
parent191b1d238fd1594ab74b1ab6a17dbe0430fc6b1a (diff)
Merge #2391
2391: Simplify r=matklad a=matklad bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
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