add tests for goto on tuple fields

This commit is contained in:
succcubbus 2019-12-13 21:59:25 +01:00
parent 6c133017a8
commit 4f7da04c67
2 changed files with 33 additions and 1 deletions

View file

@ -446,6 +446,22 @@ mod tests {
);
}
#[test]
fn goto_for_tuple_fields() {
check_goto(
"
//- /lib.rs
struct Foo(u32);
fn bar() {
let foo = Foo(0);
foo.<|>0;
}
",
"TUPLE_FIELD_DEF FileId(1) [11; 14)",
);
}
#[test]
fn goto_definition_works_for_ufcs_inherent_methods() {
check_goto(