diff options
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/call_info.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index 1f1d05409..a6676cad5 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs | |||
@@ -17,7 +17,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal | |||
17 | let calling_node = FnCallNode::with_node(syntax, position.offset)?; | 17 | let calling_node = FnCallNode::with_node(syntax, position.offset)?; |
18 | let name_ref = calling_node.name_ref()?; | 18 | let name_ref = calling_node.name_ref()?; |
19 | 19 | ||
20 | let analyser = hir::SourceAnalyser::new(db, position.file_id, name_ref.syntax()); | 20 | let analyser = hir::SourceAnalyzer::new(db, position.file_id, name_ref.syntax()); |
21 | let function = match calling_node { | 21 | let function = match calling_node { |
22 | FnCallNode::CallExpr(expr) => { | 22 | FnCallNode::CallExpr(expr) => { |
23 | //FIXME: apply subst | 23 | //FIXME: apply subst |
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index ddcf46b4e..98cdccef7 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -14,7 +14,7 @@ use crate::{db, FilePosition}; | |||
14 | #[derive(Debug)] | 14 | #[derive(Debug)] |
15 | pub(crate) struct CompletionContext<'a> { | 15 | pub(crate) struct CompletionContext<'a> { |
16 | pub(super) db: &'a db::RootDatabase, | 16 | pub(super) db: &'a db::RootDatabase, |
17 | pub(super) analyzer: hir::SourceAnalyser, | 17 | pub(super) analyzer: hir::SourceAnalyzer, |
18 | pub(super) offset: TextUnit, | 18 | pub(super) offset: TextUnit, |
19 | pub(super) token: SyntaxToken<'a>, | 19 | pub(super) token: SyntaxToken<'a>, |
20 | pub(super) resolver: Resolver, | 20 | pub(super) resolver: Resolver, |
@@ -50,7 +50,7 @@ impl<'a> CompletionContext<'a> { | |||
50 | let resolver = source_binder::resolver_for_position(db, position); | 50 | let resolver = source_binder::resolver_for_position(db, position); |
51 | let module = source_binder::module_from_position(db, position); | 51 | let module = source_binder::module_from_position(db, position); |
52 | let token = find_token_at_offset(original_file.syntax(), position.offset).left_biased()?; | 52 | let token = find_token_at_offset(original_file.syntax(), position.offset).left_biased()?; |
53 | let analyzer = hir::SourceAnalyser::new(db, position.file_id, token.parent()); | 53 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, token.parent()); |
54 | let mut ctx = CompletionContext { | 54 | let mut ctx = CompletionContext { |
55 | db, | 55 | db, |
56 | analyzer, | 56 | analyzer, |
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 7f93f50c4..1f1a8d126 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -47,7 +47,7 @@ pub(crate) fn reference_definition( | |||
47 | ) -> ReferenceResult { | 47 | ) -> ReferenceResult { |
48 | use self::ReferenceResult::*; | 48 | use self::ReferenceResult::*; |
49 | 49 | ||
50 | let analyzer = hir::SourceAnalyser::new(db, file_id, name_ref.syntax()); | 50 | let analyzer = hir::SourceAnalyzer::new(db, file_id, name_ref.syntax()); |
51 | 51 | ||
52 | // Special cases: | 52 | // Special cases: |
53 | 53 | ||
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index ec167a196..0cba5a665 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -132,7 +132,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> { | |||
132 | .ancestors() | 132 | .ancestors() |
133 | .take_while(|it| it.range() == leaf_node.range()) | 133 | .take_while(|it| it.range() == leaf_node.range()) |
134 | .find(|&it| ast::Expr::cast(it).is_some() || ast::Pat::cast(it).is_some())?; | 134 | .find(|&it| ast::Expr::cast(it).is_some() || ast::Pat::cast(it).is_some())?; |
135 | let analyzer = hir::SourceAnalyser::new(db, frange.file_id, node); | 135 | let analyzer = hir::SourceAnalyzer::new(db, frange.file_id, node); |
136 | let ty = if let Some(ty) = ast::Expr::cast(node).and_then(|e| analyzer.type_of(db, e)) { | 136 | let ty = if let Some(ty) = ast::Expr::cast(node).and_then(|e| analyzer.type_of(db, e)) { |
137 | ty | 137 | ty |
138 | } else if let Some(ty) = ast::Pat::cast(node).and_then(|p| analyzer.type_of_pat(db, p)) { | 138 | } else if let Some(ty) = ast::Pat::cast(node).and_then(|p| analyzer.type_of_pat(db, p)) { |