diff options
Diffstat (limited to 'crates/ra_ide_api/src/navigation_target.rs')
-rw-r--r-- | crates/ra_ide_api/src/navigation_target.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs index fd001179a..e9240283e 100644 --- a/crates/ra_ide_api/src/navigation_target.rs +++ b/crates/ra_ide_api/src/navigation_target.rs | |||
@@ -198,7 +198,8 @@ impl NavigationTarget { | |||
198 | buf | 198 | buf |
199 | } | 199 | } |
200 | 200 | ||
201 | fn from_named(file_id: FileId, node: &impl ast::NameOwner) -> NavigationTarget { | 201 | /// Allows `NavigationTarget` to be created from a `NameOwner` |
202 | pub(crate) fn from_named(file_id: FileId, node: &impl ast::NameOwner) -> NavigationTarget { | ||
202 | let name = node.name().map(|it| it.text().clone()).unwrap_or_default(); | 203 | let name = node.name().map(|it| it.text().clone()).unwrap_or_default(); |
203 | let focus_range = node.name().map(|it| it.syntax().range()); | 204 | let focus_range = node.name().map(|it| it.syntax().range()); |
204 | NavigationTarget::from_syntax(file_id, name, focus_range, node.syntax()) | 205 | NavigationTarget::from_syntax(file_id, name, focus_range, node.syntax()) |