aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model_impl/function/scope.rs3
-rw-r--r--crates/ra_hir/src/mock.rs1
-rw-r--r--crates/ra_hir/src/source_binder.rs2
-rw-r--r--crates/ra_hir/src/ty.rs1
4 files changed, 3 insertions, 4 deletions
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)]
310mod tests { 310mod 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".
8use ra_db::{FileId, FilePosition, Cancelable}; 8use ra_db::{FileId, FilePosition, Cancelable};
9use ra_editor::find_node_at_offset;
10use ra_syntax::{ 9use 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
15use crate::{ 15use 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
1051pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable<Arc<InferenceResult>> { 1051pub 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)?;