aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db/src/defs.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-11 15:42:24 +0100
committerAleksey Kladov <[email protected]>2020-04-11 18:20:41 +0100
commit7a39bc3ba29351feabcd4a16e12568a9e12818ca (patch)
treea5f102f40002dd66b4fc06aa2c3474f3be184a17 /crates/ra_ide_db/src/defs.rs
parente7a68c8f55e0770fdeae508a1710509c13aaffa1 (diff)
Make records grammar more orthogonal
We used name [: expr] grammar before, now it is [name :] expr which makes things simpler
Diffstat (limited to 'crates/ra_ide_db/src/defs.rs')
-rw-r--r--crates/ra_ide_db/src/defs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index e9934844e..49a8c74fb 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -216,7 +216,7 @@ pub fn classify_name_ref(
216 } 216 }
217 } 217 }
218 218
219 if let Some(record_field) = ast::RecordField::cast(parent.clone()) { 219 if let Some(record_field) = ast::RecordField::for_field_name(name_ref) {
220 tested_by!(goto_def_for_record_fields; force); 220 tested_by!(goto_def_for_record_fields; force);
221 tested_by!(goto_def_for_field_init_shorthand; force); 221 tested_by!(goto_def_for_field_init_shorthand; force);
222 if let Some((field, local)) = sema.resolve_record_field(&record_field) { 222 if let Some((field, local)) = sema.resolve_record_field(&record_field) {