We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a911f commit af41489Copy full SHA for af41489
crates/syntax/src/ast/node_ext.rs
@@ -381,11 +381,20 @@ impl ast::RecordPatField {
381
if let Some(name_ref) = self.name_ref() {
382
return Some(NameOrNameRef::NameRef(name_ref));
383
}
384
- if let Some(ast::Pat::IdentPat(pat)) = self.pat() {
385
- let name = pat.name()?;
386
- return Some(NameOrNameRef::Name(name));
+ match self.pat() {
+ Some(ast::Pat::IdentPat(pat)) => {
+ let name = pat.name()?;
387
+ Some(NameOrNameRef::Name(name))
388
+ }
389
+ Some(ast::Pat::BoxPat(pat)) => match pat.pat() {
390
391
392
393
394
+ _ => None,
395
+ },
396
397
- None
398
399
400
0 commit comments