aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgenii P <[email protected]>2019-08-04 01:56:29 +0100
committerEvgenii P <[email protected]>2019-08-04 01:56:29 +0100
commit4034ea9e4ebe2959327ddbf6c1d1e3103dd01f80 (patch)
treedfbc91c36531d7758b706463b13fdaa7f95fa2a8
parent6a94f203fc5e2dc6f48a592c26b48f3a98638d77 (diff)
source_binder.rs: fix order of imports
-rw-r--r--crates/ra_hir/src/source_binder.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 6a9f228b8..cf9a9e108 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -7,6 +7,16 @@
7/// purely for "IDE needs". 7/// purely for "IDE needs".
8use std::sync::Arc; 8use std::sync::Arc;
9 9
10use ra_db::{FileId, FilePosition};
11use ra_syntax::{
12 algo::find_node_at_offset,
13 ast::{self, AstNode, NameOwner},
14 AstPtr,
15 SyntaxKind::*,
16 SyntaxNode, SyntaxNodePtr, TextRange, TextUnit,
17};
18use rustc_hash::{FxHashMap, FxHashSet};
19
10use crate::{ 20use crate::{
11 expr::{ 21 expr::{
12 self, 22 self,
@@ -21,15 +31,6 @@ use crate::{
21 MacroDef, Module, ModuleDef, Name, Path, PerNs, Resolution, Resolver, Static, Struct, Trait, 31 MacroDef, Module, ModuleDef, Name, Path, PerNs, Resolution, Resolver, Static, Struct, Trait,
22 Ty, 32 Ty,
23}; 33};
24use ra_db::{FileId, FilePosition};
25use ra_syntax::{
26 algo::find_node_at_offset,
27 ast::{self, AstNode, NameOwner},
28 AstPtr,
29 SyntaxKind::*,
30 SyntaxNode, SyntaxNodePtr, TextRange, TextUnit,
31};
32use rustc_hash::{FxHashMap, FxHashSet};
33 34
34/// Locates the module by `FileId`. Picks topmost module in the file. 35/// Locates the module by `FileId`. Picks topmost module in the file.
35pub fn module_from_file_id(db: &impl HirDatabase, file_id: FileId) -> Option<Module> { 36pub fn module_from_file_id(db: &impl HirDatabase, file_id: FileId) -> Option<Module> {