diff options
author | Aleksey Kladov <[email protected]> | 2019-04-12 22:44:47 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-04-12 22:44:47 +0100 |
commit | 0fd93bc14a2d0ce2edd682d26c18979c13f181c5 (patch) | |
tree | e800dc46abe63bad2eaffaf7f3c0f4d8358d0c9a /crates/ra_ide_api/src/completion | |
parent | 20013de2abb95bc024f55163b1a5044cfb52a873 (diff) |
use really correct resolver for expressions
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index 86b30e787..359f2cffa 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -48,7 +48,8 @@ impl<'a> CompletionContext<'a> { | |||
48 | ) -> Option<CompletionContext<'a>> { | 48 | ) -> Option<CompletionContext<'a>> { |
49 | let module = source_binder::module_from_position(db, position); | 49 | let module = source_binder::module_from_position(db, position); |
50 | 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()?; |
51 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, token.parent()); | 51 | let analyzer = |
52 | hir::SourceAnalyzer::new(db, position.file_id, token.parent(), Some(position.offset)); | ||
52 | let mut ctx = CompletionContext { | 53 | let mut ctx = CompletionContext { |
53 | db, | 54 | db, |
54 | analyzer, | 55 | analyzer, |