From ebb0c377f0ab99a0f5e6d0c776cb9b026b62b0e4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 11 Apr 2019 16:49:35 +0300 Subject: remove resolver from CompletonContext --- crates/ra_ide_api/src/completion/completion_context.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/ra_ide_api/src/completion/completion_context.rs') 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::{ algo::{find_token_at_offset, find_covering_element, find_node_at_offset}, SyntaxKind::*, }; -use hir::{source_binder, Resolver}; +use hir::source_binder; use crate::{db, FilePosition}; @@ -17,7 +17,6 @@ pub(crate) struct CompletionContext<'a> { pub(super) analyzer: hir::SourceAnalyzer, pub(super) offset: TextUnit, pub(super) token: SyntaxToken<'a>, - pub(super) resolver: Resolver, pub(super) module: Option, pub(super) function_syntax: Option<&'a ast::FnDef>, pub(super) use_item_syntax: Option<&'a ast::UseItem>, @@ -47,7 +46,6 @@ impl<'a> CompletionContext<'a> { original_file: &'a SourceFile, position: FilePosition, ) -> Option> { - let resolver = source_binder::resolver_for_position(db, position); let module = source_binder::module_from_position(db, position); let token = find_token_at_offset(original_file.syntax(), position.offset).left_biased()?; let analyzer = hir::SourceAnalyzer::new(db, position.file_id, token.parent()); @@ -56,7 +54,6 @@ impl<'a> CompletionContext<'a> { analyzer, token, offset: position.offset, - resolver, module, function_syntax: None, use_item_syntax: None, -- cgit v1.2.3