diff options
Diffstat (limited to 'crates/ra_ide_api/src/navigation_target.rs')
-rw-r--r-- | crates/ra_ide_api/src/navigation_target.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs index 5ccb5cc2e..617908aed 100644 --- a/crates/ra_ide_api/src/navigation_target.rs +++ b/crates/ra_ide_api/src/navigation_target.rs | |||
@@ -1,9 +1,9 @@ | |||
1 | use ra_db::FileId; | 1 | use ra_db::FileId; |
2 | use ra_syntax::{ | 2 | use ra_syntax::{ |
3 | SyntaxNode, AstNode, SmolStr, TextRange, ast, | 3 | SyntaxNode, SyntaxNodePtr, AstNode, SmolStr, TextRange, ast, |
4 | SyntaxKind::{self, NAME}, | 4 | SyntaxKind::{self, NAME}, |
5 | }; | 5 | }; |
6 | use hir::{ModuleSource, FieldSource}; | 6 | use hir::{ModuleSource, FieldSource, Name}; |
7 | 7 | ||
8 | use crate::{FileSymbol, db::RootDatabase}; | 8 | use crate::{FileSymbol, db::RootDatabase}; |
9 | 9 | ||
@@ -58,12 +58,13 @@ impl NavigationTarget { | |||
58 | 58 | ||
59 | pub(crate) fn from_scope_entry( | 59 | pub(crate) fn from_scope_entry( |
60 | file_id: FileId, | 60 | file_id: FileId, |
61 | entry: &hir::ScopeEntryWithSyntax, | 61 | name: Name, |
62 | ptr: SyntaxNodePtr, | ||
62 | ) -> NavigationTarget { | 63 | ) -> NavigationTarget { |
63 | NavigationTarget { | 64 | NavigationTarget { |
64 | file_id, | 65 | file_id, |
65 | name: entry.name().to_string().into(), | 66 | name: name.to_string().into(), |
66 | full_range: entry.ptr().range(), | 67 | full_range: ptr.range(), |
67 | focus_range: None, | 68 | focus_range: None, |
68 | kind: NAME, | 69 | kind: NAME, |
69 | } | 70 | } |