aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast/generated.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs
index 5edb9faaa..8eb91c1df 100644
--- a/crates/libsyntax2/src/ast/generated.rs
+++ b/crates/libsyntax2/src/ast/generated.rs
@@ -283,25 +283,25 @@ impl<'a> AstNode<'a> for NameRef<'a> {
283 283
284impl<'a> NameRef<'a> {} 284impl<'a> NameRef<'a> {}
285 285
286// NamedField 286// NamedFieldDef
287#[derive(Debug, Clone, Copy)] 287#[derive(Debug, Clone, Copy)]
288pub struct NamedField<'a> { 288pub struct NamedFieldDef<'a> {
289 syntax: SyntaxNodeRef<'a>, 289 syntax: SyntaxNodeRef<'a>,
290} 290}
291 291
292impl<'a> AstNode<'a> for NamedField<'a> { 292impl<'a> AstNode<'a> for NamedFieldDef<'a> {
293 fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { 293 fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> {
294 match syntax.kind() { 294 match syntax.kind() {
295 NAMED_FIELD => Some(NamedField { syntax }), 295 NAMED_FIELD_DEF => Some(NamedFieldDef { syntax }),
296 _ => None, 296 _ => None,
297 } 297 }
298 } 298 }
299 fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } 299 fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax }
300} 300}
301 301
302impl<'a> ast::NameOwner<'a> for NamedField<'a> {} 302impl<'a> ast::NameOwner<'a> for NamedFieldDef<'a> {}
303impl<'a> ast::AttrsOwner<'a> for NamedField<'a> {} 303impl<'a> ast::AttrsOwner<'a> for NamedFieldDef<'a> {}
304impl<'a> NamedField<'a> {} 304impl<'a> NamedFieldDef<'a> {}
305 305
306// NeverType 306// NeverType
307#[derive(Debug, Clone, Copy)] 307#[derive(Debug, Clone, Copy)]
@@ -498,7 +498,7 @@ impl<'a> ast::NameOwner<'a> for StructDef<'a> {}
498impl<'a> ast::TypeParamsOwner<'a> for StructDef<'a> {} 498impl<'a> ast::TypeParamsOwner<'a> for StructDef<'a> {}
499impl<'a> ast::AttrsOwner<'a> for StructDef<'a> {} 499impl<'a> ast::AttrsOwner<'a> for StructDef<'a> {}
500impl<'a> StructDef<'a> { 500impl<'a> StructDef<'a> {
501 pub fn fields(self) -> impl Iterator<Item = NamedField<'a>> + 'a { 501 pub fn fields(self) -> impl Iterator<Item = NamedFieldDef<'a>> + 'a {
502 super::children(self) 502 super::children(self)
503 } 503 }
504} 504}