From deab4caa7b1ba81c1b7e6561bc270bbde6467f13 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 12 Jul 2019 19:41:13 +0300 Subject: make Parse fields private this is in preparation for the new rowan API --- crates/ra_ide_api/src/completion/completion_context.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api/src/completion') 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> { ) -> Option> { let module = source_binder::module_from_position(db, position); let token = - find_token_at_offset(original_parse.tree.syntax(), position.offset).left_biased()?; + find_token_at_offset(original_parse.tree().syntax(), position.offset).left_biased()?; let analyzer = hir::SourceAnalyzer::new(db, position.file_id, token.parent(), Some(position.offset)); let mut ctx = CompletionContext { @@ -89,7 +89,7 @@ impl<'a> CompletionContext<'a> { // actual completion. let file = { let edit = AtomTextEdit::insert(offset, "intellijRulezz".to_string()); - original_parse.reparse(&edit).tree + original_parse.reparse(&edit).tree().to_owned() }; // First, let's try to complete a reference to some declaration. @@ -100,7 +100,7 @@ impl<'a> CompletionContext<'a> { self.is_param = true; return; } - self.classify_name_ref(&original_parse.tree, name_ref); + self.classify_name_ref(original_parse.tree(), name_ref); } // Otherwise, see if this is a declaration. We can use heuristics to -- cgit v1.2.3