rename struct -> record, pos -> tuple

This commit is contained in:
Aleksey Kladov 2019-08-23 15:55:21 +03:00
parent c12dce0073
commit 5b18a4eef9
78 changed files with 640 additions and 634 deletions

View file

@ -178,7 +178,7 @@ fn named_target(file_id: FileId, node: &SyntaxNode) -> Option<NavigationTarget>
node.short_label(),
)
})
.visit(|node: ast::NamedFieldDef| {
.visit(|node: ast::RecordFieldDef| {
NavigationTarget::from_named(
file_id,
&node,
@ -344,13 +344,13 @@ mod tests {
foo.spam<|>;
}
",
"spam NAMED_FIELD_DEF FileId(1) [17; 26) [17; 21)",
"spam RECORD_FIELD_DEF FileId(1) [17; 26) [17; 21)",
);
}
#[test]
fn goto_definition_works_for_named_fields() {
covers!(goto_definition_works_for_named_fields);
fn goto_definition_works_for_record_fields() {
covers!(goto_definition_works_for_record_fields);
check_goto(
"
//- /lib.rs
@ -364,7 +364,7 @@ mod tests {
}
}
",
"spam NAMED_FIELD_DEF FileId(1) [17; 26) [17; 21)",
"spam RECORD_FIELD_DEF FileId(1) [17; 26) [17; 21)",
);
}
#[test]
@ -473,7 +473,7 @@ mod tests {
field<|>: string,
}
"#,
"field NAMED_FIELD_DEF FileId(1) [17; 30) [17; 22)",
"field RECORD_FIELD_DEF FileId(1) [17; 30) [17; 22)",
);
check_goto(