aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast/node_ext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/src/ast/node_ext.rs')
-rw-r--r--crates/syntax/src/ast/node_ext.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs
index ce35ac01a..b70b840b8 100644
--- a/crates/syntax/src/ast/node_ext.rs
+++ b/crates/syntax/src/ast/node_ext.rs
@@ -203,15 +203,7 @@ impl ast::RecordExprField {
203 if let Some(name_ref) = self.name_ref() { 203 if let Some(name_ref) = self.name_ref() {
204 return Some(name_ref); 204 return Some(name_ref);
205 } 205 }
206 if let Some(ast::Expr::PathExpr(expr)) = self.expr() { 206 self.expr()?.name_ref()
207 let path = expr.path()?;
208 let segment = path.segment()?;
209 let name_ref = segment.name_ref()?;
210 if path.qualifier().is_none() {
211 return Some(name_ref);
212 }
213 }
214 None
215 } 207 }
216} 208}
217 209