aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/completion_context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_context.rs')
-rw-r--r--crates/ra_ide_api/src/completion/completion_context.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs
index ca8f7900d..0d630fdf6 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide_api/src/completion/completion_context.rs
@@ -86,18 +86,6 @@ impl<'a> CompletionContext<'a> {
86 } 86 }
87 87
88 fn fill(&mut self, original_file: &'a SourceFile, offset: TextUnit) { 88 fn fill(&mut self, original_file: &'a SourceFile, offset: TextUnit) {
89 // We heed the original NameRef before the "intellijRulezz" hack
90 if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(original_file.syntax(), offset)
91 {
92 if let Some(path) = name_ref.syntax().ancestors().find_map(ast::Path::cast) {
93 if let Some(path) = hir::Path::from_ast(path) {
94 if let Some(ident) = path.as_ident() {
95 self.path_ident = Some(ident.clone());
96 }
97 }
98 }
99 }
100
101 // Insert a fake ident to get a valid parse tree. We will use this file 89 // Insert a fake ident to get a valid parse tree. We will use this file
102 // to determine context, though the original_file will be used for 90 // to determine context, though the original_file will be used for
103 // actual completion. 91 // actual completion.