diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function/scope.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/mock.rs | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/ty.rs | 1 |
5 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index 245a21ce3..5a8fdbfc6 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml | |||
@@ -14,7 +14,6 @@ parking_lot = "0.7.0" | |||
14 | ena = "0.11" | 14 | ena = "0.11" |
15 | ra_syntax = { path = "../ra_syntax" } | 15 | ra_syntax = { path = "../ra_syntax" } |
16 | ra_arena = { path = "../ra_arena" } | 16 | ra_arena = { path = "../ra_arena" } |
17 | ra_editor = { path = "../ra_editor" } | ||
18 | ra_db = { path = "../ra_db" } | 17 | ra_db = { path = "../ra_db" } |
19 | test_utils = { path = "../test_utils" } | 18 | test_utils = { path = "../test_utils" } |
20 | 19 | ||
diff --git a/crates/ra_hir/src/code_model_impl/function/scope.rs b/crates/ra_hir/src/code_model_impl/function/scope.rs index 699784f71..ebf6edc1b 100644 --- a/crates/ra_hir/src/code_model_impl/function/scope.rs +++ b/crates/ra_hir/src/code_model_impl/function/scope.rs | |||
@@ -308,8 +308,7 @@ pub struct ReferenceDescriptor { | |||
308 | 308 | ||
309 | #[cfg(test)] | 309 | #[cfg(test)] |
310 | mod tests { | 310 | mod tests { |
311 | use ra_editor::find_node_at_offset; | 311 | use ra_syntax::{SourceFile, algo::find_node_at_offset}; |
312 | use ra_syntax::SourceFile; | ||
313 | use test_utils::{extract_offset, assert_eq_text}; | 312 | use test_utils::{extract_offset, assert_eq_text}; |
314 | 313 | ||
315 | use crate::expr; | 314 | use crate::expr; |
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs index c9af38009..0fae7de82 100644 --- a/crates/ra_hir/src/mock.rs +++ b/crates/ra_hir/src/mock.rs | |||
@@ -215,7 +215,6 @@ salsa::database_storage! { | |||
215 | } | 215 | } |
216 | impl ra_db::SyntaxDatabase { | 216 | impl ra_db::SyntaxDatabase { |
217 | fn source_file() for ra_db::SourceFileQuery; | 217 | fn source_file() for ra_db::SourceFileQuery; |
218 | fn file_lines() for ra_db::FileLinesQuery; | ||
219 | } | 218 | } |
220 | impl db::HirDatabase { | 219 | impl db::HirDatabase { |
221 | fn hir_source_file() for db::HirSourceFileQuery; | 220 | fn hir_source_file() for db::HirSourceFileQuery; |
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 59a803761..4b0400cd0 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -6,10 +6,10 @@ | |||
6 | /// So, this modules should not be used during hir construction, it exists | 6 | /// So, this modules should not be used during hir construction, it exists |
7 | /// purely for "IDE needs". | 7 | /// purely for "IDE needs". |
8 | use ra_db::{FileId, FilePosition, Cancelable}; | 8 | use ra_db::{FileId, FilePosition, Cancelable}; |
9 | use ra_editor::find_node_at_offset; | ||
10 | use ra_syntax::{ | 9 | use ra_syntax::{ |
11 | SmolStr, TextRange, SyntaxNode, | 10 | SmolStr, TextRange, SyntaxNode, |
12 | ast::{self, AstNode, NameOwner}, | 11 | ast::{self, AstNode, NameOwner}, |
12 | algo::find_node_at_offset, | ||
13 | }; | 13 | }; |
14 | 14 | ||
15 | use crate::{ | 15 | use crate::{ |
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 8adeedddb..90ba393ce 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -1049,6 +1049,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable<Arc<InferenceResult>> { | 1051 | pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable<Arc<InferenceResult>> { |
1052 | db.check_canceled()?; | ||
1052 | let function = Function::new(def_id); // TODO: consts also need inference | 1053 | let function = Function::new(def_id); // TODO: consts also need inference |
1053 | let body = function.body(db)?; | 1054 | let body = function.body(db)?; |
1054 | let scopes = db.fn_scopes(def_id)?; | 1055 | let scopes = db.fn_scopes(def_id)?; |