diff options
Diffstat (limited to 'crates/ra_ide/src/goto_definition.rs')
-rw-r--r-- | crates/ra_ide/src/goto_definition.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 76ee232a3..4a8107d60 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs | |||
@@ -1,7 +1,10 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir::Semantics; | 3 | use hir::Semantics; |
4 | use ra_ide_db::{defs::classify_name, symbol_index, RootDatabase}; | 4 | use ra_ide_db::{ |
5 | defs::{classify_name, classify_name_ref}, | ||
6 | symbol_index, RootDatabase, | ||
7 | }; | ||
5 | use ra_syntax::{ | 8 | use ra_syntax::{ |
6 | ast::{self}, | 9 | ast::{self}, |
7 | match_ast, AstNode, | 10 | match_ast, AstNode, |
@@ -11,7 +14,6 @@ use ra_syntax::{ | |||
11 | 14 | ||
12 | use crate::{ | 15 | use crate::{ |
13 | display::{ToNav, TryToNav}, | 16 | display::{ToNav, TryToNav}, |
14 | references::classify_name_ref, | ||
15 | FilePosition, NavigationTarget, RangeInfo, | 17 | FilePosition, NavigationTarget, RangeInfo, |
16 | }; | 18 | }; |
17 | 19 | ||
@@ -94,7 +96,7 @@ pub(crate) fn reference_definition( | |||
94 | 96 | ||
95 | #[cfg(test)] | 97 | #[cfg(test)] |
96 | mod tests { | 98 | mod tests { |
97 | use test_utils::{assert_eq_text, covers}; | 99 | use test_utils::assert_eq_text; |
98 | 100 | ||
99 | use crate::mock_analysis::analysis_and_position; | 101 | use crate::mock_analysis::analysis_and_position; |
100 | 102 | ||
@@ -206,7 +208,6 @@ mod tests { | |||
206 | 208 | ||
207 | #[test] | 209 | #[test] |
208 | fn goto_def_for_macros() { | 210 | fn goto_def_for_macros() { |
209 | covers!(goto_def_for_macros); | ||
210 | check_goto( | 211 | check_goto( |
211 | " | 212 | " |
212 | //- /lib.rs | 213 | //- /lib.rs |
@@ -223,7 +224,6 @@ mod tests { | |||
223 | 224 | ||
224 | #[test] | 225 | #[test] |
225 | fn goto_def_for_macros_from_other_crates() { | 226 | fn goto_def_for_macros_from_other_crates() { |
226 | covers!(goto_def_for_macros); | ||
227 | check_goto( | 227 | check_goto( |
228 | " | 228 | " |
229 | //- /lib.rs | 229 | //- /lib.rs |
@@ -335,7 +335,6 @@ mod tests { | |||
335 | 335 | ||
336 | #[test] | 336 | #[test] |
337 | fn goto_def_for_methods() { | 337 | fn goto_def_for_methods() { |
338 | covers!(goto_def_for_methods); | ||
339 | check_goto( | 338 | check_goto( |
340 | " | 339 | " |
341 | //- /lib.rs | 340 | //- /lib.rs |
@@ -355,7 +354,6 @@ mod tests { | |||
355 | 354 | ||
356 | #[test] | 355 | #[test] |
357 | fn goto_def_for_fields() { | 356 | fn goto_def_for_fields() { |
358 | covers!(goto_def_for_fields); | ||
359 | check_goto( | 357 | check_goto( |
360 | " | 358 | " |
361 | //- /lib.rs | 359 | //- /lib.rs |
@@ -374,7 +372,6 @@ mod tests { | |||
374 | 372 | ||
375 | #[test] | 373 | #[test] |
376 | fn goto_def_for_record_fields() { | 374 | fn goto_def_for_record_fields() { |
377 | covers!(goto_def_for_record_fields); | ||
378 | check_goto( | 375 | check_goto( |
379 | " | 376 | " |
380 | //- /lib.rs | 377 | //- /lib.rs |
@@ -787,7 +784,6 @@ mod tests { | |||
787 | 784 | ||
788 | #[test] | 785 | #[test] |
789 | fn goto_def_for_field_init_shorthand() { | 786 | fn goto_def_for_field_init_shorthand() { |
790 | covers!(goto_def_for_field_init_shorthand); | ||
791 | check_goto( | 787 | check_goto( |
792 | " | 788 | " |
793 | //- /lib.rs | 789 | //- /lib.rs |