diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index 55fdba50d..f6584cdd6 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -48,7 +48,7 @@ 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 = | 50 | let token = |
51 | find_token_at_offset(original_parse.tree.syntax(), position.offset).left_biased()?; | 51 | find_token_at_offset(original_parse.tree().syntax(), position.offset).left_biased()?; |
52 | let analyzer = | 52 | let analyzer = |
53 | hir::SourceAnalyzer::new(db, position.file_id, token.parent(), Some(position.offset)); | 53 | hir::SourceAnalyzer::new(db, position.file_id, token.parent(), Some(position.offset)); |
54 | let mut ctx = CompletionContext { | 54 | let mut ctx = CompletionContext { |
@@ -89,7 +89,7 @@ impl<'a> CompletionContext<'a> { | |||
89 | // actual completion. | 89 | // actual completion. |
90 | let file = { | 90 | let file = { |
91 | let edit = AtomTextEdit::insert(offset, "intellijRulezz".to_string()); | 91 | let edit = AtomTextEdit::insert(offset, "intellijRulezz".to_string()); |
92 | original_parse.reparse(&edit).tree | 92 | original_parse.reparse(&edit).tree().to_owned() |
93 | }; | 93 | }; |
94 | 94 | ||
95 | // First, let's try to complete a reference to some declaration. | 95 | // First, let's try to complete a reference to some declaration. |
@@ -100,7 +100,7 @@ impl<'a> CompletionContext<'a> { | |||
100 | self.is_param = true; | 100 | self.is_param = true; |
101 | return; | 101 | return; |
102 | } | 102 | } |
103 | self.classify_name_ref(&original_parse.tree, name_ref); | 103 | self.classify_name_ref(original_parse.tree(), name_ref); |
104 | } | 104 | } |
105 | 105 | ||
106 | // Otherwise, see if this is a declaration. We can use heuristics to | 106 | // Otherwise, see if this is a declaration. We can use heuristics to |