diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-21 14:08:10 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-21 14:08:10 +0000 |
commit | df45f28fedab9b0620ea038849ec8e93c3b4ab26 (patch) | |
tree | 7025977c0333378cd209dc47c1d160c7cdef206a /crates/ra_ide/src/completion/completion_context.rs | |
parent | a1f4c988e47b7160b11070d18f50657b6fb9014c (diff) | |
parent | 973b5cf7e20842711d59a810b268796b26241382 (diff) |
Merge #2632
2632: Revert "Merge #2629" r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion/completion_context.rs')
-rw-r--r-- | crates/ra_ide/src/completion/completion_context.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index 8f56ce706..4894ea2f6 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs | |||
@@ -18,7 +18,6 @@ pub(crate) struct CompletionContext<'a> { | |||
18 | pub(super) analyzer: hir::SourceAnalyzer, | 18 | pub(super) analyzer: hir::SourceAnalyzer, |
19 | pub(super) offset: TextUnit, | 19 | pub(super) offset: TextUnit, |
20 | pub(super) token: SyntaxToken, | 20 | pub(super) token: SyntaxToken, |
21 | pub(super) name_ref: Option<ast::NameRef>, | ||
22 | pub(super) module: Option<hir::Module>, | 21 | pub(super) module: Option<hir::Module>, |
23 | pub(super) function_syntax: Option<ast::FnDef>, | 22 | pub(super) function_syntax: Option<ast::FnDef>, |
24 | pub(super) use_item_syntax: Option<ast::UseItem>, | 23 | pub(super) use_item_syntax: Option<ast::UseItem>, |
@@ -69,7 +68,6 @@ impl<'a> CompletionContext<'a> { | |||
69 | analyzer, | 68 | analyzer, |
70 | token, | 69 | token, |
71 | offset: position.offset, | 70 | offset: position.offset, |
72 | name_ref: None, | ||
73 | module, | 71 | module, |
74 | function_syntax: None, | 72 | function_syntax: None, |
75 | use_item_syntax: None, | 73 | use_item_syntax: None, |
@@ -144,8 +142,6 @@ impl<'a> CompletionContext<'a> { | |||
144 | } | 142 | } |
145 | 143 | ||
146 | fn classify_name_ref(&mut self, original_file: SourceFile, name_ref: ast::NameRef) { | 144 | fn classify_name_ref(&mut self, original_file: SourceFile, name_ref: ast::NameRef) { |
147 | self.name_ref = | ||
148 | find_node_at_offset(original_file.syntax(), name_ref.syntax().text_range().start()); | ||
149 | let name_range = name_ref.syntax().text_range(); | 145 | let name_range = name_ref.syntax().text_range(); |
150 | if name_ref.syntax().parent().and_then(ast::RecordField::cast).is_some() { | 146 | if name_ref.syntax().parent().and_then(ast::RecordField::cast).is_some() { |
151 | self.record_lit_syntax = find_node_at_offset(original_file.syntax(), self.offset); | 147 | self.record_lit_syntax = find_node_at_offset(original_file.syntax(), self.offset); |