diff options
Diffstat (limited to 'crates/libanalysis')
-rw-r--r-- | crates/libanalysis/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libanalysis/src/lib.rs b/crates/libanalysis/src/lib.rs index c84ab6077..a3f721cc8 100644 --- a/crates/libanalysis/src/lib.rs +++ b/crates/libanalysis/src/lib.rs | |||
@@ -32,7 +32,7 @@ use libsyntax2::{ | |||
32 | ast::{self, AstNode, NameOwner}, | 32 | ast::{self, AstNode, NameOwner}, |
33 | SyntaxKind::*, | 33 | SyntaxKind::*, |
34 | }; | 34 | }; |
35 | use libeditor::{LineIndex, FileSymbol, find_node}; | 35 | use libeditor::{LineIndex, FileSymbol, find_node_at_offset}; |
36 | 36 | ||
37 | use self::{ | 37 | use self::{ |
38 | symbol_index::FileSymbols, | 38 | symbol_index::FileSymbols, |
@@ -183,10 +183,10 @@ impl World { | |||
183 | ) -> Result<Vec<(FileId, FileSymbol)>> { | 183 | ) -> Result<Vec<(FileId, FileSymbol)>> { |
184 | let file = self.file_syntax(id)?; | 184 | let file = self.file_syntax(id)?; |
185 | let syntax = file.syntax(); | 185 | let syntax = file.syntax(); |
186 | if let Some(name_ref) = find_node::<ast::NameRef>(syntax, offset) { | 186 | if let Some(name_ref) = find_node_at_offset::<ast::NameRef>(syntax, offset) { |
187 | return Ok(self.index_resolve(name_ref)); | 187 | return Ok(self.index_resolve(name_ref)); |
188 | } | 188 | } |
189 | if let Some(name) = find_node::<ast::Name>(syntax, offset) { | 189 | if let Some(name) = find_node_at_offset::<ast::Name>(syntax, offset) { |
190 | if let Some(module) = name.syntax().parent().and_then(ast::Module::cast) { | 190 | if let Some(module) = name.syntax().parent().and_then(ast::Module::cast) { |
191 | if module.has_semi() { | 191 | if module.has_semi() { |
192 | let file_ids = self.resolve_module(id, module); | 192 | let file_ids = self.resolve_module(id, module); |