aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/goto_definition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r--crates/ra_ide_api/src/goto_definition.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs
index ddd55a9c1..28529a2de 100644
--- a/crates/ra_ide_api/src/goto_definition.rs
+++ b/crates/ra_ide_api/src/goto_definition.rs
@@ -178,7 +178,7 @@ fn named_target(file_id: FileId, node: &SyntaxNode) -> Option<NavigationTarget>
178 node.short_label(), 178 node.short_label(),
179 ) 179 )
180 }) 180 })
181 .visit(|node: ast::NamedFieldDef| { 181 .visit(|node: ast::RecordFieldDef| {
182 NavigationTarget::from_named( 182 NavigationTarget::from_named(
183 file_id, 183 file_id,
184 &node, 184 &node,
@@ -344,13 +344,13 @@ mod tests {
344 foo.spam<|>; 344 foo.spam<|>;
345 } 345 }
346 ", 346 ",
347 "spam NAMED_FIELD_DEF FileId(1) [17; 26) [17; 21)", 347 "spam RECORD_FIELD_DEF FileId(1) [17; 26) [17; 21)",
348 ); 348 );
349 } 349 }
350 350
351 #[test] 351 #[test]
352 fn goto_definition_works_for_named_fields() { 352 fn goto_definition_works_for_record_fields() {
353 covers!(goto_definition_works_for_named_fields); 353 covers!(goto_definition_works_for_record_fields);
354 check_goto( 354 check_goto(
355 " 355 "
356 //- /lib.rs 356 //- /lib.rs
@@ -364,7 +364,7 @@ mod tests {
364 } 364 }
365 } 365 }
366 ", 366 ",
367 "spam NAMED_FIELD_DEF FileId(1) [17; 26) [17; 21)", 367 "spam RECORD_FIELD_DEF FileId(1) [17; 26) [17; 21)",
368 ); 368 );
369 } 369 }
370 #[test] 370 #[test]
@@ -473,7 +473,7 @@ mod tests {
473 field<|>: string, 473 field<|>: string,
474 } 474 }
475 "#, 475 "#,
476 "field NAMED_FIELD_DEF FileId(1) [17; 30) [17; 22)", 476 "field RECORD_FIELD_DEF FileId(1) [17; 30) [17; 22)",
477 ); 477 );
478 478
479 check_goto( 479 check_goto(