From 19115e9fabf1364fe94c21b44546aa01f380f04c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 4 Mar 2020 11:38:55 +0100 Subject: Support cross-crate marks --- crates/ra_ide/src/goto_definition.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 4a8107d60..a55a13ffc 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs @@ -96,7 +96,7 @@ pub(crate) fn reference_definition( #[cfg(test)] mod tests { - use test_utils::assert_eq_text; + use test_utils::{assert_eq_text, covers}; use crate::mock_analysis::analysis_and_position; @@ -208,6 +208,7 @@ mod tests { #[test] fn goto_def_for_macros() { + covers!(ra_ide_db::goto_def_for_macros); check_goto( " //- /lib.rs @@ -224,6 +225,7 @@ mod tests { #[test] fn goto_def_for_macros_from_other_crates() { + covers!(ra_ide_db::goto_def_for_macros); check_goto( " //- /lib.rs @@ -335,6 +337,7 @@ mod tests { #[test] fn goto_def_for_methods() { + covers!(ra_ide_db::goto_def_for_methods); check_goto( " //- /lib.rs @@ -354,6 +357,7 @@ mod tests { #[test] fn goto_def_for_fields() { + covers!(ra_ide_db::goto_def_for_fields); check_goto( " //- /lib.rs @@ -372,6 +376,7 @@ mod tests { #[test] fn goto_def_for_record_fields() { + covers!(ra_ide_db::goto_def_for_record_fields); check_goto( " //- /lib.rs @@ -784,6 +789,7 @@ mod tests { #[test] fn goto_def_for_field_init_shorthand() { + covers!(ra_ide_db::goto_def_for_field_init_shorthand); check_goto( " //- /lib.rs -- cgit v1.2.3 From 5095573139359ecf4560c66d13278c4122a4ca8b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 4 Mar 2020 11:40:49 +0100 Subject: Remove stray FIXME --- crates/ra_ide/src/references.rs | 3 --- 1 file changed, 3 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index 67be3f6c9..95468d434 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs @@ -222,9 +222,6 @@ fn process_definition( } }; - // FIXME: reuse sb - // See https://github.com/rust-lang/rust/pull/68198#issuecomment-574269098 - if let Some(d) = classify_name_ref(&sema, &name_ref) { let d = d.definition(); if &d == def { -- cgit v1.2.3