diff options
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r-- | crates/ra_ide/src/display/navigation_target.rs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 6a2bf7273..6a6b49afd 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs | |||
@@ -7,14 +7,10 @@ use ra_syntax::{ | |||
7 | ast::{self, DocCommentsOwner, NameOwner}, | 7 | ast::{self, DocCommentsOwner, NameOwner}, |
8 | match_ast, AstNode, SmolStr, | 8 | match_ast, AstNode, SmolStr, |
9 | SyntaxKind::{self, BIND_PAT, TYPE_PARAM}, | 9 | SyntaxKind::{self, BIND_PAT, TYPE_PARAM}, |
10 | SyntaxNode, TextRange, | 10 | TextRange, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | use crate::{ | 13 | use crate::{db::RootDatabase, expand::original_range, FileSymbol}; |
14 | db::RootDatabase, | ||
15 | expand::{original_range_by_kind, OriginalRangeKind}, | ||
16 | FileRange, FileSymbol, | ||
17 | }; | ||
18 | 14 | ||
19 | use super::short_label::ShortLabel; | 15 | use super::short_label::ShortLabel; |
20 | 16 | ||
@@ -420,14 +416,3 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> | |||
420 | } | 416 | } |
421 | } | 417 | } |
422 | } | 418 | } |
423 | |||
424 | fn original_range(db: &RootDatabase, node: InFile<&SyntaxNode>) -> FileRange { | ||
425 | if let Some(range) = original_range_by_kind(db, node, OriginalRangeKind::CallToken) { | ||
426 | return range; | ||
427 | } | ||
428 | if let Some(range) = original_range_by_kind(db, node, OriginalRangeKind::WholeCall) { | ||
429 | return range; | ||
430 | } | ||
431 | |||
432 | FileRange { file_id: node.file_id.original_file(db), range: node.value.text_range() } | ||
433 | } | ||