diff options
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); |