diff options
author | Aleksey Kladov <[email protected]> | 2019-04-11 14:49:35 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-04-11 14:49:35 +0100 |
commit | ebb0c377f0ab99a0f5e6d0c776cb9b026b62b0e4 (patch) | |
tree | 49a2c265c83ae03182cf593c52ec8a0c155ad151 /crates/ra_ide_api/src/completion/completion_context.rs | |
parent | 3c9f2d0e372cff6490dcd30411cb6cc1f691fde7 (diff) |
remove resolver from CompletonContext
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_context.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index 98cdccef7..86b30e787 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -5,7 +5,7 @@ use ra_syntax::{ | |||
5 | algo::{find_token_at_offset, find_covering_element, find_node_at_offset}, | 5 | algo::{find_token_at_offset, find_covering_element, find_node_at_offset}, |
6 | SyntaxKind::*, | 6 | SyntaxKind::*, |
7 | }; | 7 | }; |
8 | use hir::{source_binder, Resolver}; | 8 | use hir::source_binder; |
9 | 9 | ||
10 | use crate::{db, FilePosition}; | 10 | use crate::{db, FilePosition}; |
11 | 11 | ||
@@ -17,7 +17,6 @@ pub(crate) struct CompletionContext<'a> { | |||
17 | pub(super) analyzer: hir::SourceAnalyzer, | 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, | ||
21 | pub(super) module: Option<hir::Module>, | 20 | pub(super) module: Option<hir::Module>, |
22 | pub(super) function_syntax: Option<&'a ast::FnDef>, | 21 | pub(super) function_syntax: Option<&'a ast::FnDef>, |
23 | pub(super) use_item_syntax: Option<&'a ast::UseItem>, | 22 | pub(super) use_item_syntax: Option<&'a ast::UseItem>, |
@@ -47,7 +46,6 @@ impl<'a> CompletionContext<'a> { | |||
47 | original_file: &'a SourceFile, | 46 | original_file: &'a SourceFile, |
48 | position: FilePosition, | 47 | position: FilePosition, |
49 | ) -> Option<CompletionContext<'a>> { | 48 | ) -> Option<CompletionContext<'a>> { |
50 | let resolver = source_binder::resolver_for_position(db, position); | ||
51 | let module = source_binder::module_from_position(db, position); | 49 | let module = source_binder::module_from_position(db, position); |
52 | let token = find_token_at_offset(original_file.syntax(), position.offset).left_biased()?; | 50 | let token = find_token_at_offset(original_file.syntax(), position.offset).left_biased()?; |
53 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, token.parent()); | 51 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, token.parent()); |
@@ -56,7 +54,6 @@ impl<'a> CompletionContext<'a> { | |||
56 | analyzer, | 54 | analyzer, |
57 | token, | 55 | token, |
58 | offset: position.offset, | 56 | offset: position.offset, |
59 | resolver, | ||
60 | module, | 57 | module, |
61 | function_syntax: None, | 58 | function_syntax: None, |
62 | use_item_syntax: None, | 59 | use_item_syntax: None, |