Return ident for ExprField and PatField HIR nodes

This commit is contained in:
Gurinder Singh 2023-09-01 06:36:02 +05:30
parent b1b244da65
commit 19574d216a
3 changed files with 38 additions and 2 deletions

View file

@ -3729,6 +3729,8 @@ impl<'hir> Node<'hir> {
Node::Lifetime(lt) => Some(lt.ident),
Node::GenericParam(p) => Some(p.name.ident()),
Node::TypeBinding(b) => Some(b.ident),
Node::PatField(f) => Some(f.ident),
Node::ExprField(f) => Some(f.ident),
Node::Param(..)
| Node::AnonConst(..)
| Node::ConstBlock(..)
@ -3737,8 +3739,6 @@ impl<'hir> Node<'hir> {
| Node::Block(..)
| Node::Ctor(..)
| Node::Pat(..)
| Node::PatField(..)
| Node::ExprField(..)
| Node::Arm(..)
| Node::Local(..)
| Node::Crate(..)