diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-18 21:19:35 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-18 21:19:35 +0100 |
commit | 58d4983ba5745975446d60f2886d96f8d2adf0f2 (patch) | |
tree | 2336c03a0eeef98ac375868bd27dfe7e50668869 /crates/ra_ide_api/src/completion/completion_context.rs | |
parent | abe72424a647a31840eb952d42905f83628a623c (diff) | |
parent | df33e7685bdb0f63bf6aa809b9046708d563a1a7 (diff) |
Merge #1548
1548: use Parse in mbe r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_context.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index f6584cdd6..4aa84751f 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -43,7 +43,7 @@ pub(crate) struct CompletionContext<'a> { | |||
43 | impl<'a> CompletionContext<'a> { | 43 | impl<'a> CompletionContext<'a> { |
44 | pub(super) fn new( | 44 | pub(super) fn new( |
45 | db: &'a db::RootDatabase, | 45 | db: &'a db::RootDatabase, |
46 | original_parse: &'a Parse, | 46 | original_parse: &'a Parse<ast::SourceFile>, |
47 | position: FilePosition, | 47 | position: FilePosition, |
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); |
@@ -83,7 +83,7 @@ impl<'a> CompletionContext<'a> { | |||
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | fn fill(&mut self, original_parse: &'a Parse, offset: TextUnit) { | 86 | fn fill(&mut self, original_parse: &'a Parse<ast::SourceFile>, offset: TextUnit) { |
87 | // Insert a fake ident to get a valid parse tree. We will use this file | 87 | // Insert a fake ident to get a valid parse tree. We will use this file |
88 | // to determine context, though the original_file will be used for | 88 | // to determine context, though the original_file will be used for |
89 | // actual completion. | 89 | // actual completion. |