aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-04 10:56:11 +0000
committerGitHub <[email protected]>2020-03-04 10:56:11 +0000
commit79d05aacd82dc38f491a87c2f61dc38e8da6e81c (patch)
tree4dce12051c938fbb5a69c23b5dedea6b0a707aa5 /crates/ra_ide/src
parent437329d3f5b7bb5b703b93c75a97d349eb77d6c7 (diff)
parent5095573139359ecf4560c66d13278c4122a4ca8b (diff)
Merge #3438
3438: Remove stray FIXME r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/goto_definition.rs8
-rw-r--r--crates/ra_ide/src/references.rs3
2 files changed, 7 insertions, 4 deletions
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(
96 96
97#[cfg(test)] 97#[cfg(test)]
98mod tests { 98mod tests {
99 use test_utils::assert_eq_text; 99 use test_utils::{assert_eq_text, covers};
100 100
101 use crate::mock_analysis::analysis_and_position; 101 use crate::mock_analysis::analysis_and_position;
102 102
@@ -208,6 +208,7 @@ mod tests {
208 208
209 #[test] 209 #[test]
210 fn goto_def_for_macros() { 210 fn goto_def_for_macros() {
211 covers!(ra_ide_db::goto_def_for_macros);
211 check_goto( 212 check_goto(
212 " 213 "
213 //- /lib.rs 214 //- /lib.rs
@@ -224,6 +225,7 @@ mod tests {
224 225
225 #[test] 226 #[test]
226 fn goto_def_for_macros_from_other_crates() { 227 fn goto_def_for_macros_from_other_crates() {
228 covers!(ra_ide_db::goto_def_for_macros);
227 check_goto( 229 check_goto(
228 " 230 "
229 //- /lib.rs 231 //- /lib.rs
@@ -335,6 +337,7 @@ mod tests {
335 337
336 #[test] 338 #[test]
337 fn goto_def_for_methods() { 339 fn goto_def_for_methods() {
340 covers!(ra_ide_db::goto_def_for_methods);
338 check_goto( 341 check_goto(
339 " 342 "
340 //- /lib.rs 343 //- /lib.rs
@@ -354,6 +357,7 @@ mod tests {
354 357
355 #[test] 358 #[test]
356 fn goto_def_for_fields() { 359 fn goto_def_for_fields() {
360 covers!(ra_ide_db::goto_def_for_fields);
357 check_goto( 361 check_goto(
358 " 362 "
359 //- /lib.rs 363 //- /lib.rs
@@ -372,6 +376,7 @@ mod tests {
372 376
373 #[test] 377 #[test]
374 fn goto_def_for_record_fields() { 378 fn goto_def_for_record_fields() {
379 covers!(ra_ide_db::goto_def_for_record_fields);
375 check_goto( 380 check_goto(
376 " 381 "
377 //- /lib.rs 382 //- /lib.rs
@@ -784,6 +789,7 @@ mod tests {
784 789
785 #[test] 790 #[test]
786 fn goto_def_for_field_init_shorthand() { 791 fn goto_def_for_field_init_shorthand() {
792 covers!(ra_ide_db::goto_def_for_field_init_shorthand);
787 check_goto( 793 check_goto(
788 " 794 "
789 //- /lib.rs 795 //- /lib.rs
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(
222 } 222 }
223 }; 223 };
224 224
225 // FIXME: reuse sb
226 // See https://github.com/rust-lang/rust/pull/68198#issuecomment-574269098
227
228 if let Some(d) = classify_name_ref(&sema, &name_ref) { 225 if let Some(d) = classify_name_ref(&sema, &name_ref) {
229 let d = d.definition(); 226 let d = d.definition();
230 if &d == def { 227 if &d == def {