aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 08e86844d..429575fee 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -7,21 +7,25 @@
7/// purely for "IDE needs". 7/// purely for "IDE needs".
8use std::sync::Arc; 8use std::sync::Arc;
9 9
10use rustc_hash::{FxHashSet, FxHashMap};
11use ra_db::{FileId, FilePosition}; 10use ra_db::{FileId, FilePosition};
12use ra_syntax::{ 11use ra_syntax::{
13 SyntaxNode, AstPtr, TextUnit, SyntaxNodePtr, TextRange,
14 ast::{self, AstNode, NameOwner},
15 algo::find_node_at_offset, 12 algo::find_node_at_offset,
13 ast::{self, AstNode, NameOwner},
14 AstPtr,
16 SyntaxKind::*, 15 SyntaxKind::*,
16 SyntaxNode, SyntaxNodePtr, TextRange, TextUnit,
17}; 17};
18use rustc_hash::{FxHashMap, FxHashSet};
18 19
19use crate::{ 20use crate::{
20 HirDatabase, Function, Struct, Enum, Const, Static, Either, DefWithBody, PerNs, Name, 21 expr,
21 AsName, Module, HirFileId, Crate, Trait, Resolver, Ty, Path, MacroDef, 22 expr::{
22 expr::{BodySourceMap, scope::{ScopeId, ExprScopes}}, 23 scope::{ExprScopes, ScopeId},
24 BodySourceMap,
25 },
23 ids::LocationCtx, 26 ids::LocationCtx,
24 expr, AstId, 27 AsName, AstId, Const, Crate, DefWithBody, Either, Enum, Function, HirDatabase, HirFileId,
28 MacroDef, Module, Name, Path, PerNs, Resolver, Static, Struct, Trait, Ty,
25}; 29};
26 30
27/// Locates the module by `FileId`. Picks topmost module in the file. 31/// Locates the module by `FileId`. Picks topmost module in the file.