aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/goto_definition.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-06 14:14:47 +0000
committerGitHub <[email protected]>2020-02-06 14:14:47 +0000
commitff2d77bde6acffc5e4c42878606b3d6d92300e11 (patch)
tree76b0a8bbf94b0c68dd3aa891e0d9ea5cdf067863 /crates/ra_ide/src/goto_definition.rs
parent19de59a9233a09a9b70a96a6c49213b119819c46 (diff)
parent355c98fd0861acf0f0fddad08cbc923fee0698fb (diff)
Merge #3029
3029: Docs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/goto_definition.rs')
-rw-r--r--crates/ra_ide/src/goto_definition.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 5a12a619c..e9329a72c 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -1,6 +1,7 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{db::AstDatabase, InFile, SourceBinder}; 3use hir::{db::AstDatabase, InFile, SourceBinder};
4use ra_ide_db::{symbol_index, RootDatabase};
4use ra_syntax::{ 5use ra_syntax::{
5 ast::{self, DocCommentsOwner}, 6 ast::{self, DocCommentsOwner},
6 match_ast, AstNode, 7 match_ast, AstNode,
@@ -9,7 +10,6 @@ use ra_syntax::{
9}; 10};
10 11
11use crate::{ 12use crate::{
12 db::RootDatabase,
13 display::{ShortLabel, ToNav}, 13 display::{ShortLabel, ToNav},
14 expand::descend_into_macros, 14 expand::descend_into_macros,
15 references::{classify_name_ref, NameKind::*}, 15 references::{classify_name_ref, NameKind::*},
@@ -94,7 +94,7 @@ pub(crate) fn reference_definition(
94 }; 94 };
95 95
96 // Fallback index based approach: 96 // Fallback index based approach:
97 let navs = crate::symbol_index::index_resolve(sb.db, name_ref.value) 97 let navs = symbol_index::index_resolve(sb.db, name_ref.value)
98 .into_iter() 98 .into_iter()
99 .map(|s| s.to_nav(sb.db)) 99 .map(|s| s.to_nav(sb.db))
100 .collect(); 100 .collect();