diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 15:21:30 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 15:21:30 +0100 |
commit | 6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 (patch) | |
tree | 9bf4ba410b86ee0b262ce1b0379bbf8dc64b07e6 /crates/ra_syntax/src/ast/node_ext.rs | |
parent | 98ec5f2c21d0072e4811309ac111db75b87146d1 (diff) |
Rename RecordLit -> RecordExpr
Diffstat (limited to 'crates/ra_syntax/src/ast/node_ext.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/node_ext.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs index a7a301d6b..8c7457e32 100644 --- a/crates/ra_syntax/src/ast/node_ext.rs +++ b/crates/ra_syntax/src/ast/node_ext.rs | |||
@@ -189,11 +189,11 @@ impl ast::StructDef { | |||
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | impl ast::RecordField { | 192 | impl ast::RecordExprField { |
193 | pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordField> { | 193 | pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordExprField> { |
194 | let candidate = | 194 | let candidate = |
195 | field_name.syntax().parent().and_then(ast::RecordField::cast).or_else(|| { | 195 | field_name.syntax().parent().and_then(ast::RecordExprField::cast).or_else(|| { |
196 | field_name.syntax().ancestors().nth(4).and_then(ast::RecordField::cast) | 196 | field_name.syntax().ancestors().nth(4).and_then(ast::RecordExprField::cast) |
197 | })?; | 197 | })?; |
198 | if candidate.field_name().as_ref() == Some(field_name) { | 198 | if candidate.field_name().as_ref() == Some(field_name) { |
199 | Some(candidate) | 199 | Some(candidate) |