aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/hir')
-rw-r--r--crates/ra_analysis/src/hir/db.rs5
-rw-r--r--crates/ra_analysis/src/hir/function/scope.rs3
-rw-r--r--crates/ra_analysis/src/hir/module/imp.rs4
-rw-r--r--crates/ra_analysis/src/hir/module/mod.rs2
-rw-r--r--crates/ra_analysis/src/hir/module/nameres.rs5
-rw-r--r--crates/ra_analysis/src/hir/query_definitions.rs2
6 files changed, 10 insertions, 11 deletions
diff --git a/crates/ra_analysis/src/hir/db.rs b/crates/ra_analysis/src/hir/db.rs
index bf0dc393a..0ae2086ff 100644
--- a/crates/ra_analysis/src/hir/db.rs
+++ b/crates/ra_analysis/src/hir/db.rs
@@ -4,10 +4,10 @@ use ra_syntax::{
4 SyntaxNode, 4 SyntaxNode,
5 ast::FnDefNode, 5 ast::FnDefNode,
6}; 6};
7use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase};
7 8
8use crate::{ 9use crate::{
9 FileId, 10 FileId,
10 db::SyntaxDatabase,
11 hir::{ 11 hir::{
12 SourceFileItems, SourceItemId, 12 SourceFileItems, SourceItemId,
13 query_definitions, 13 query_definitions,
@@ -15,8 +15,7 @@ use crate::{
15 module::{ModuleId, ModuleTree, ModuleSource, 15 module::{ModuleId, ModuleTree, ModuleSource,
16 nameres::{ItemMap, InputModuleItems}}, 16 nameres::{ItemMap, InputModuleItems}},
17 }, 17 },
18 input::SourceRootId, 18 loc2id::{DefLoc, DefId, FnId},
19 loc2id::{DefLoc, DefId, FnId, LocationIntener},
20 Cancelable, 19 Cancelable,
21}; 20};
22 21
diff --git a/crates/ra_analysis/src/hir/function/scope.rs b/crates/ra_analysis/src/hir/function/scope.rs
index 76b2fea68..ed789fede 100644
--- a/crates/ra_analysis/src/hir/function/scope.rs
+++ b/crates/ra_analysis/src/hir/function/scope.rs
@@ -5,9 +5,10 @@ use ra_syntax::{
5 algo::generate, 5 algo::generate,
6 ast::{self, ArgListOwner, LoopBodyOwner, NameOwner}, 6 ast::{self, ArgListOwner, LoopBodyOwner, NameOwner},
7}; 7};
8use ra_db::LocalSyntaxPtr;
8 9
9use crate::{ 10use crate::{
10 syntax_ptr::LocalSyntaxPtr, 11
11 arena::{Arena, Id}, 12 arena::{Arena, Id},
12}; 13};
13 14
diff --git a/crates/ra_analysis/src/hir/module/imp.rs b/crates/ra_analysis/src/hir/module/imp.rs
index d51ca2d59..c8f7ed58d 100644
--- a/crates/ra_analysis/src/hir/module/imp.rs
+++ b/crates/ra_analysis/src/hir/module/imp.rs
@@ -6,11 +6,11 @@ use ra_syntax::{
6}; 6};
7use relative_path::RelativePathBuf; 7use relative_path::RelativePathBuf;
8use rustc_hash::{FxHashMap, FxHashSet}; 8use rustc_hash::{FxHashMap, FxHashSet};
9use ra_db::{SourceRoot, SourceRootId, FileResolverImp};
9 10
10use crate::{ 11use crate::{
11 hir::HirDatabase, 12 hir::HirDatabase,
12 input::{SourceRoot, SourceRootId}, 13 Cancelable, FileId,
13 Cancelable, FileId, FileResolverImp,
14}; 14};
15 15
16use super::{ 16use super::{
diff --git a/crates/ra_analysis/src/hir/module/mod.rs b/crates/ra_analysis/src/hir/module/mod.rs
index 893ec3a10..683cb5d4c 100644
--- a/crates/ra_analysis/src/hir/module/mod.rs
+++ b/crates/ra_analysis/src/hir/module/mod.rs
@@ -10,12 +10,12 @@ use ra_syntax::{
10 ast::{self, AstNode, NameOwner}, 10 ast::{self, AstNode, NameOwner},
11 SmolStr, SyntaxNode, 11 SmolStr, SyntaxNode,
12}; 12};
13use ra_db::SourceRootId;
13use relative_path::RelativePathBuf; 14use relative_path::RelativePathBuf;
14 15
15use crate::{ 16use crate::{
16 FileId, FilePosition, Cancelable, 17 FileId, FilePosition, Cancelable,
17 hir::{Path, PathKind, HirDatabase, SourceItemId}, 18 hir::{Path, PathKind, HirDatabase, SourceItemId},
18 input::SourceRootId,
19 arena::{Arena, Id}, 19 arena::{Arena, Id},
20 loc2id::{DefLoc, DefId}, 20 loc2id::{DefLoc, DefId},
21}; 21};
diff --git a/crates/ra_analysis/src/hir/module/nameres.rs b/crates/ra_analysis/src/hir/module/nameres.rs
index f48f51c8d..5c87e7af2 100644
--- a/crates/ra_analysis/src/hir/module/nameres.rs
+++ b/crates/ra_analysis/src/hir/module/nameres.rs
@@ -19,12 +19,12 @@ use std::{
19}; 19};
20 20
21use rustc_hash::FxHashMap; 21use rustc_hash::FxHashMap;
22
23use ra_syntax::{ 22use ra_syntax::{
24 TextRange, 23 TextRange,
25 SmolStr, SyntaxKind::{self, *}, 24 SmolStr, SyntaxKind::{self, *},
26 ast::{self, AstNode} 25 ast::{self, AstNode}
27}; 26};
27use ra_db::SourceRootId;
28 28
29use crate::{ 29use crate::{
30 Cancelable, FileId, 30 Cancelable, FileId,
@@ -35,7 +35,6 @@ use crate::{
35 HirDatabase, 35 HirDatabase,
36 module::{ModuleId, ModuleTree}, 36 module::{ModuleId, ModuleTree},
37 }, 37 },
38 input::SourceRootId,
39}; 38};
40 39
41/// Item map is the result of the name resolution. Item map contains, for each 40/// Item map is the result of the name resolution. Item map contains, for each
@@ -342,11 +341,11 @@ where
342 341
343#[cfg(test)] 342#[cfg(test)]
344mod tests { 343mod tests {
344 use ra_db::FilesDatabase;
345 use crate::{ 345 use crate::{
346 AnalysisChange, 346 AnalysisChange,
347 mock_analysis::{MockAnalysis, analysis_and_position}, 347 mock_analysis::{MockAnalysis, analysis_and_position},
348 hir::{self, HirDatabase}, 348 hir::{self, HirDatabase},
349 input::FilesDatabase,
350}; 349};
351 use super::*; 350 use super::*;
352 351
diff --git a/crates/ra_analysis/src/hir/query_definitions.rs b/crates/ra_analysis/src/hir/query_definitions.rs
index 6570ca994..fbdf8eb67 100644
--- a/crates/ra_analysis/src/hir/query_definitions.rs
+++ b/crates/ra_analysis/src/hir/query_definitions.rs
@@ -8,6 +8,7 @@ use ra_syntax::{
8 AstNode, SyntaxNode, SmolStr, 8 AstNode, SyntaxNode, SmolStr,
9 ast::{self, FnDef, FnDefNode, NameOwner, ModuleItemOwner} 9 ast::{self, FnDef, FnDefNode, NameOwner, ModuleItemOwner}
10}; 10};
11use ra_db::SourceRootId;
11 12
12use crate::{ 13use crate::{
13 FileId, Cancelable, 14 FileId, Cancelable,
@@ -21,7 +22,6 @@ use crate::{
21 nameres::{InputModuleItems, ItemMap, Resolver}, 22 nameres::{InputModuleItems, ItemMap, Resolver},
22 }, 23 },
23 }, 24 },
24 input::SourceRootId,
25}; 25};
26 26
27/// Resolve `FnId` to the corresponding `SyntaxNode` 27/// Resolve `FnId` to the corresponding `SyntaxNode`