Skip to main content

ra_ap_syntax/ast/generated/
nodes.rs

1//! Generated by `cargo xtask codegen grammar`, do not edit by hand.
2
3#![allow(non_snake_case)]
4use crate::{
5    SyntaxKind::{self, *},
6    SyntaxNode, SyntaxToken, T,
7    ast::{self, AstChildren, AstNode, support},
8};
9use std::{fmt, hash};
10pub struct Abi {
11    pub(crate) syntax: SyntaxNode,
12}
13impl Abi {
14    #[inline]
15    pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
16    #[inline]
17    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
18}
19pub struct ArgList {
20    pub(crate) syntax: SyntaxNode,
21}
22impl ArgList {
23    #[inline]
24    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
25    #[inline]
26    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
27}
28pub struct ArrayExpr {
29    pub(crate) syntax: SyntaxNode,
30}
31impl ast::HasAttrs for ArrayExpr {}
32impl ArrayExpr {
33    #[inline]
34    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
35    #[inline]
36    pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
37    #[inline]
38    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
39    #[inline]
40    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
41    #[inline]
42    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
43}
44pub struct ArrayType {
45    pub(crate) syntax: SyntaxNode,
46}
47impl ArrayType {
48    #[inline]
49    pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
50    #[inline]
51    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
52    #[inline]
53    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
54    #[inline]
55    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
56    #[inline]
57    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
58}
59pub struct AsmClobberAbi {
60    pub(crate) syntax: SyntaxNode,
61}
62impl AsmClobberAbi {
63    #[inline]
64    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
65    #[inline]
66    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
67    #[inline]
68    pub fn clobber_abi_token(&self) -> Option<SyntaxToken> {
69        support::token(&self.syntax, T![clobber_abi])
70    }
71    #[inline]
72    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
73}
74pub struct AsmConst {
75    pub(crate) syntax: SyntaxNode,
76}
77impl AsmConst {
78    #[inline]
79    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
80    #[inline]
81    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
82}
83pub struct AsmDirSpec {
84    pub(crate) syntax: SyntaxNode,
85}
86impl AsmDirSpec {
87    #[inline]
88    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
89    #[inline]
90    pub fn inlateout_token(&self) -> Option<SyntaxToken> {
91        support::token(&self.syntax, T![inlateout])
92    }
93    #[inline]
94    pub fn inout_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![inout]) }
95    #[inline]
96    pub fn lateout_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![lateout]) }
97    #[inline]
98    pub fn out_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![out]) }
99}
100pub struct AsmExpr {
101    pub(crate) syntax: SyntaxNode,
102}
103impl ast::HasAttrs for AsmExpr {}
104impl AsmExpr {
105    #[inline]
106    pub fn asm_pieces(&self) -> AstChildren<AsmPiece> { support::children(&self.syntax) }
107    #[inline]
108    pub fn template(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
109    #[inline]
110    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
111    #[inline]
112    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
113    #[inline]
114    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
115    #[inline]
116    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
117    #[inline]
118    pub fn asm_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![asm]) }
119    #[inline]
120    pub fn builtin_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![builtin]) }
121    #[inline]
122    pub fn global_asm_token(&self) -> Option<SyntaxToken> {
123        support::token(&self.syntax, T![global_asm])
124    }
125    #[inline]
126    pub fn naked_asm_token(&self) -> Option<SyntaxToken> {
127        support::token(&self.syntax, T![naked_asm])
128    }
129}
130pub struct AsmLabel {
131    pub(crate) syntax: SyntaxNode,
132}
133impl AsmLabel {
134    #[inline]
135    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
136    #[inline]
137    pub fn label_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![label]) }
138}
139pub struct AsmOperandExpr {
140    pub(crate) syntax: SyntaxNode,
141}
142impl AsmOperandExpr {
143    #[inline]
144    pub fn in_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
145    #[inline]
146    pub fn out_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
147    #[inline]
148    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
149}
150pub struct AsmOperandNamed {
151    pub(crate) syntax: SyntaxNode,
152}
153impl ast::HasName for AsmOperandNamed {}
154impl AsmOperandNamed {
155    #[inline]
156    pub fn asm_operand(&self) -> Option<AsmOperand> { support::child(&self.syntax) }
157    #[inline]
158    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
159}
160pub struct AsmOption {
161    pub(crate) syntax: SyntaxNode,
162}
163impl AsmOption {
164    #[inline]
165    pub fn att_syntax_token(&self) -> Option<SyntaxToken> {
166        support::token(&self.syntax, T![att_syntax])
167    }
168    #[inline]
169    pub fn may_unwind_token(&self) -> Option<SyntaxToken> {
170        support::token(&self.syntax, T![may_unwind])
171    }
172    #[inline]
173    pub fn nomem_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![nomem]) }
174    #[inline]
175    pub fn noreturn_token(&self) -> Option<SyntaxToken> {
176        support::token(&self.syntax, T![noreturn])
177    }
178    #[inline]
179    pub fn nostack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![nostack]) }
180    #[inline]
181    pub fn preserves_flags_token(&self) -> Option<SyntaxToken> {
182        support::token(&self.syntax, T![preserves_flags])
183    }
184    #[inline]
185    pub fn pure_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![pure]) }
186    #[inline]
187    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
188    #[inline]
189    pub fn readonly_token(&self) -> Option<SyntaxToken> {
190        support::token(&self.syntax, T![readonly])
191    }
192}
193pub struct AsmOptions {
194    pub(crate) syntax: SyntaxNode,
195}
196impl AsmOptions {
197    #[inline]
198    pub fn asm_options(&self) -> AstChildren<AsmOption> { support::children(&self.syntax) }
199    #[inline]
200    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
201    #[inline]
202    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
203    #[inline]
204    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
205    #[inline]
206    pub fn options_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![options]) }
207}
208pub struct AsmRegOperand {
209    pub(crate) syntax: SyntaxNode,
210}
211impl AsmRegOperand {
212    #[inline]
213    pub fn asm_dir_spec(&self) -> Option<AsmDirSpec> { support::child(&self.syntax) }
214    #[inline]
215    pub fn asm_operand_expr(&self) -> Option<AsmOperandExpr> { support::child(&self.syntax) }
216    #[inline]
217    pub fn asm_reg_spec(&self) -> Option<AsmRegSpec> { support::child(&self.syntax) }
218    #[inline]
219    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
220    #[inline]
221    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
222}
223pub struct AsmRegSpec {
224    pub(crate) syntax: SyntaxNode,
225}
226impl AsmRegSpec {
227    #[inline]
228    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
229    #[inline]
230    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
231}
232pub struct AsmSym {
233    pub(crate) syntax: SyntaxNode,
234}
235impl AsmSym {
236    #[inline]
237    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
238    #[inline]
239    pub fn sym_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![sym]) }
240}
241pub struct AssocItemList {
242    pub(crate) syntax: SyntaxNode,
243}
244impl ast::HasAttrs for AssocItemList {}
245impl AssocItemList {
246    #[inline]
247    pub fn assoc_items(&self) -> AstChildren<AssocItem> { support::children(&self.syntax) }
248    #[inline]
249    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
250    #[inline]
251    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
252}
253pub struct AssocTypeArg {
254    pub(crate) syntax: SyntaxNode,
255}
256impl ast::HasGenericArgs for AssocTypeArg {}
257impl ast::HasTypeBounds for AssocTypeArg {}
258impl AssocTypeArg {
259    #[inline]
260    pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
261    #[inline]
262    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
263    #[inline]
264    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
265    #[inline]
266    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
267    #[inline]
268    pub fn return_type_syntax(&self) -> Option<ReturnTypeSyntax> { support::child(&self.syntax) }
269    #[inline]
270    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
271    #[inline]
272    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
273}
274pub struct Attr {
275    pub(crate) syntax: SyntaxNode,
276}
277impl Attr {
278    #[inline]
279    pub fn meta(&self) -> Option<Meta> { support::child(&self.syntax) }
280    #[inline]
281    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
282    #[inline]
283    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
284    #[inline]
285    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
286    #[inline]
287    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
288}
289pub struct AwaitExpr {
290    pub(crate) syntax: SyntaxNode,
291}
292impl ast::HasAttrs for AwaitExpr {}
293impl AwaitExpr {
294    #[inline]
295    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
296    #[inline]
297    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
298    #[inline]
299    pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) }
300}
301pub struct BecomeExpr {
302    pub(crate) syntax: SyntaxNode,
303}
304impl ast::HasAttrs for BecomeExpr {}
305impl BecomeExpr {
306    #[inline]
307    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
308    #[inline]
309    pub fn become_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![become]) }
310}
311pub struct BinExpr {
312    pub(crate) syntax: SyntaxNode,
313}
314impl ast::HasAttrs for BinExpr {}
315impl BinExpr {}
316pub struct BlockExpr {
317    pub(crate) syntax: SyntaxNode,
318}
319impl ast::HasAttrs for BlockExpr {}
320impl BlockExpr {
321    #[inline]
322    pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
323    #[inline]
324    pub fn stmt_list(&self) -> Option<StmtList> { support::child(&self.syntax) }
325    #[inline]
326    pub fn try_block_modifier(&self) -> Option<TryBlockModifier> { support::child(&self.syntax) }
327    #[inline]
328    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
329    #[inline]
330    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
331    #[inline]
332    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
333    #[inline]
334    pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
335    #[inline]
336    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
337}
338pub struct BoxPat {
339    pub(crate) syntax: SyntaxNode,
340}
341impl BoxPat {
342    #[inline]
343    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
344    #[inline]
345    pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
346}
347pub struct BreakExpr {
348    pub(crate) syntax: SyntaxNode,
349}
350impl ast::HasAttrs for BreakExpr {}
351impl BreakExpr {
352    #[inline]
353    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
354    #[inline]
355    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
356    #[inline]
357    pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) }
358}
359pub struct CallExpr {
360    pub(crate) syntax: SyntaxNode,
361}
362impl ast::HasArgList for CallExpr {}
363impl ast::HasAttrs for CallExpr {}
364impl CallExpr {
365    #[inline]
366    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
367}
368pub struct CastExpr {
369    pub(crate) syntax: SyntaxNode,
370}
371impl ast::HasAttrs for CastExpr {}
372impl CastExpr {
373    #[inline]
374    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
375    #[inline]
376    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
377    #[inline]
378    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
379}
380pub struct ClosureExpr {
381    pub(crate) syntax: SyntaxNode,
382}
383impl ast::HasAttrs for ClosureExpr {}
384impl ClosureExpr {
385    #[inline]
386    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
387    #[inline]
388    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
389    #[inline]
390    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
391    #[inline]
392    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
393    #[inline]
394    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
395    #[inline]
396    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
397    #[inline]
398    pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
399    #[inline]
400    pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
401}
402pub struct Const {
403    pub(crate) syntax: SyntaxNode,
404}
405impl ast::HasAttrs for Const {}
406impl ast::HasDocComments for Const {}
407impl ast::HasGenericParams for Const {}
408impl ast::HasName for Const {}
409impl ast::HasVisibility for Const {}
410impl Const {
411    #[inline]
412    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
413    #[inline]
414    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
415    #[inline]
416    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
417    #[inline]
418    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
419    #[inline]
420    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
421    #[inline]
422    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
423    #[inline]
424    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
425}
426pub struct ConstArg {
427    pub(crate) syntax: SyntaxNode,
428}
429impl ConstArg {
430    #[inline]
431    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
432}
433pub struct ConstBlockPat {
434    pub(crate) syntax: SyntaxNode,
435}
436impl ConstBlockPat {
437    #[inline]
438    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
439    #[inline]
440    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
441}
442pub struct ConstParam {
443    pub(crate) syntax: SyntaxNode,
444}
445impl ast::HasAttrs for ConstParam {}
446impl ast::HasName for ConstParam {}
447impl ConstParam {
448    #[inline]
449    pub fn default_val(&self) -> Option<ConstArg> { support::child(&self.syntax) }
450    #[inline]
451    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
452    #[inline]
453    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
454    #[inline]
455    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
456    #[inline]
457    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
458}
459pub struct ContinueExpr {
460    pub(crate) syntax: SyntaxNode,
461}
462impl ast::HasAttrs for ContinueExpr {}
463impl ContinueExpr {
464    #[inline]
465    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
466    #[inline]
467    pub fn continue_token(&self) -> Option<SyntaxToken> {
468        support::token(&self.syntax, T![continue])
469    }
470}
471pub struct DynTraitType {
472    pub(crate) syntax: SyntaxNode,
473}
474impl DynTraitType {
475    #[inline]
476    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
477    #[inline]
478    pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) }
479}
480pub struct Enum {
481    pub(crate) syntax: SyntaxNode,
482}
483impl ast::HasAttrs for Enum {}
484impl ast::HasDocComments for Enum {}
485impl ast::HasGenericParams for Enum {}
486impl ast::HasName for Enum {}
487impl ast::HasVisibility for Enum {}
488impl Enum {
489    #[inline]
490    pub fn variant_list(&self) -> Option<VariantList> { support::child(&self.syntax) }
491    #[inline]
492    pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) }
493}
494pub struct ExprStmt {
495    pub(crate) syntax: SyntaxNode,
496}
497impl ExprStmt {
498    #[inline]
499    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
500    #[inline]
501    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
502}
503pub struct ExternBlock {
504    pub(crate) syntax: SyntaxNode,
505}
506impl ast::HasAttrs for ExternBlock {}
507impl ast::HasDocComments for ExternBlock {}
508impl ExternBlock {
509    #[inline]
510    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
511    #[inline]
512    pub fn extern_item_list(&self) -> Option<ExternItemList> { support::child(&self.syntax) }
513    #[inline]
514    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
515}
516pub struct ExternCrate {
517    pub(crate) syntax: SyntaxNode,
518}
519impl ast::HasAttrs for ExternCrate {}
520impl ast::HasDocComments for ExternCrate {}
521impl ast::HasVisibility for ExternCrate {}
522impl ExternCrate {
523    #[inline]
524    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
525    #[inline]
526    pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
527    #[inline]
528    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
529    #[inline]
530    pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
531    #[inline]
532    pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
533}
534pub struct ExternItemList {
535    pub(crate) syntax: SyntaxNode,
536}
537impl ast::HasAttrs for ExternItemList {}
538impl ExternItemList {
539    #[inline]
540    pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) }
541    #[inline]
542    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
543    #[inline]
544    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
545}
546pub struct FieldExpr {
547    pub(crate) syntax: SyntaxNode,
548}
549impl ast::HasAttrs for FieldExpr {}
550impl FieldExpr {
551    #[inline]
552    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
553    #[inline]
554    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
555    #[inline]
556    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
557}
558pub struct Fn {
559    pub(crate) syntax: SyntaxNode,
560}
561impl ast::HasAttrs for Fn {}
562impl ast::HasDocComments for Fn {}
563impl ast::HasGenericParams for Fn {}
564impl ast::HasName for Fn {}
565impl ast::HasVisibility for Fn {}
566impl Fn {
567    #[inline]
568    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
569    #[inline]
570    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
571    #[inline]
572    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
573    #[inline]
574    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
575    #[inline]
576    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
577    #[inline]
578    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
579    #[inline]
580    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
581    #[inline]
582    pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
583    #[inline]
584    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
585    #[inline]
586    pub fn safe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![safe]) }
587    #[inline]
588    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
589}
590pub struct FnPtrType {
591    pub(crate) syntax: SyntaxNode,
592}
593impl FnPtrType {
594    #[inline]
595    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
596    #[inline]
597    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
598    #[inline]
599    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
600    #[inline]
601    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
602    #[inline]
603    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
604    #[inline]
605    pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
606    #[inline]
607    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
608}
609pub struct ForBinder {
610    pub(crate) syntax: SyntaxNode,
611}
612impl ForBinder {
613    #[inline]
614    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
615    #[inline]
616    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
617}
618pub struct ForExpr {
619    pub(crate) syntax: SyntaxNode,
620}
621impl ast::HasAttrs for ForExpr {}
622impl ForExpr {
623    #[inline]
624    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
625    #[inline]
626    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
627    #[inline]
628    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
629}
630pub struct ForType {
631    pub(crate) syntax: SyntaxNode,
632}
633impl ForType {
634    #[inline]
635    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
636    #[inline]
637    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
638}
639pub struct FormatArgsArg {
640    pub(crate) syntax: SyntaxNode,
641}
642impl FormatArgsArg {
643    #[inline]
644    pub fn arg_name(&self) -> Option<FormatArgsArgName> { support::child(&self.syntax) }
645    #[inline]
646    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
647}
648pub struct FormatArgsArgName {
649    pub(crate) syntax: SyntaxNode,
650}
651impl FormatArgsArgName {
652    #[inline]
653    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
654}
655pub struct FormatArgsExpr {
656    pub(crate) syntax: SyntaxNode,
657}
658impl ast::HasAttrs for FormatArgsExpr {}
659impl FormatArgsExpr {
660    #[inline]
661    pub fn template(&self) -> Option<Expr> { support::child(&self.syntax) }
662    #[inline]
663    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
664    #[inline]
665    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
666    #[inline]
667    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
668    #[inline]
669    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
670    #[inline]
671    pub fn builtin_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![builtin]) }
672    #[inline]
673    pub fn format_args_token(&self) -> Option<SyntaxToken> {
674        support::token(&self.syntax, T![format_args])
675    }
676}
677pub struct GenericArgList {
678    pub(crate) syntax: SyntaxNode,
679}
680impl GenericArgList {
681    #[inline]
682    pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) }
683    #[inline]
684    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
685    #[inline]
686    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
687    #[inline]
688    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
689}
690pub struct GenericParamList {
691    pub(crate) syntax: SyntaxNode,
692}
693impl GenericParamList {
694    #[inline]
695    pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
696    #[inline]
697    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
698    #[inline]
699    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
700}
701pub struct IdentPat {
702    pub(crate) syntax: SyntaxNode,
703}
704impl ast::HasAttrs for IdentPat {}
705impl ast::HasName for IdentPat {}
706impl IdentPat {
707    #[inline]
708    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
709    #[inline]
710    pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) }
711    #[inline]
712    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
713    #[inline]
714    pub fn ref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ref]) }
715}
716pub struct IfExpr {
717    pub(crate) syntax: SyntaxNode,
718}
719impl ast::HasAttrs for IfExpr {}
720impl IfExpr {
721    #[inline]
722    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
723    #[inline]
724    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
725}
726pub struct Impl {
727    pub(crate) syntax: SyntaxNode,
728}
729impl ast::HasAttrs for Impl {}
730impl ast::HasDocComments for Impl {}
731impl ast::HasGenericParams for Impl {}
732impl ast::HasVisibility for Impl {}
733impl Impl {
734    #[inline]
735    pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
736    #[inline]
737    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
738    #[inline]
739    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
740    #[inline]
741    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
742    #[inline]
743    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
744    #[inline]
745    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
746    #[inline]
747    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
748}
749pub struct ImplTraitType {
750    pub(crate) syntax: SyntaxNode,
751}
752impl ImplTraitType {
753    #[inline]
754    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
755    #[inline]
756    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
757}
758pub struct IndexExpr {
759    pub(crate) syntax: SyntaxNode,
760}
761impl ast::HasAttrs for IndexExpr {}
762impl IndexExpr {
763    #[inline]
764    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
765    #[inline]
766    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
767}
768pub struct InferType {
769    pub(crate) syntax: SyntaxNode,
770}
771impl InferType {
772    #[inline]
773    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
774}
775pub struct ItemList {
776    pub(crate) syntax: SyntaxNode,
777}
778impl ast::HasAttrs for ItemList {}
779impl ast::HasModuleItem for ItemList {}
780impl ItemList {
781    #[inline]
782    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
783    #[inline]
784    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
785}
786pub struct Label {
787    pub(crate) syntax: SyntaxNode,
788}
789impl Label {
790    #[inline]
791    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
792    #[inline]
793    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
794}
795pub struct LetElse {
796    pub(crate) syntax: SyntaxNode,
797}
798impl LetElse {
799    #[inline]
800    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
801    #[inline]
802    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
803}
804pub struct LetExpr {
805    pub(crate) syntax: SyntaxNode,
806}
807impl ast::HasAttrs for LetExpr {}
808impl LetExpr {
809    #[inline]
810    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
811    #[inline]
812    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
813    #[inline]
814    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
815    #[inline]
816    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
817}
818pub struct LetStmt {
819    pub(crate) syntax: SyntaxNode,
820}
821impl ast::HasAttrs for LetStmt {}
822impl LetStmt {
823    #[inline]
824    pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
825    #[inline]
826    pub fn let_else(&self) -> Option<LetElse> { support::child(&self.syntax) }
827    #[inline]
828    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
829    #[inline]
830    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
831    #[inline]
832    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
833    #[inline]
834    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
835    #[inline]
836    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
837    #[inline]
838    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
839    #[inline]
840    pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
841}
842pub struct Lifetime {
843    pub(crate) syntax: SyntaxNode,
844}
845impl Lifetime {
846    #[inline]
847    pub fn lifetime_ident_token(&self) -> Option<SyntaxToken> {
848        support::token(&self.syntax, T![lifetime_ident])
849    }
850}
851pub struct LifetimeArg {
852    pub(crate) syntax: SyntaxNode,
853}
854impl LifetimeArg {
855    #[inline]
856    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
857}
858pub struct LifetimeParam {
859    pub(crate) syntax: SyntaxNode,
860}
861impl ast::HasAttrs for LifetimeParam {}
862impl ast::HasTypeBounds for LifetimeParam {}
863impl LifetimeParam {
864    #[inline]
865    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
866}
867pub struct Literal {
868    pub(crate) syntax: SyntaxNode,
869}
870impl ast::HasAttrs for Literal {}
871impl Literal {}
872pub struct LiteralPat {
873    pub(crate) syntax: SyntaxNode,
874}
875impl LiteralPat {
876    #[inline]
877    pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
878    #[inline]
879    pub fn minus_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![-]) }
880}
881pub struct LoopExpr {
882    pub(crate) syntax: SyntaxNode,
883}
884impl ast::HasAttrs for LoopExpr {}
885impl ast::HasLoopBody for LoopExpr {}
886impl LoopExpr {
887    #[inline]
888    pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
889}
890pub struct MacroCall {
891    pub(crate) syntax: SyntaxNode,
892}
893impl ast::HasAttrs for MacroCall {}
894impl ast::HasDocComments for MacroCall {}
895impl MacroCall {
896    #[inline]
897    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
898    #[inline]
899    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
900    #[inline]
901    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
902    #[inline]
903    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
904}
905pub struct MacroDef {
906    pub(crate) syntax: SyntaxNode,
907}
908impl ast::HasAttrs for MacroDef {}
909impl ast::HasDocComments for MacroDef {}
910impl ast::HasName for MacroDef {}
911impl ast::HasVisibility for MacroDef {}
912impl MacroDef {
913    #[inline]
914    pub fn macro_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![macro]) }
915}
916pub struct MacroExpr {
917    pub(crate) syntax: SyntaxNode,
918}
919impl MacroExpr {
920    #[inline]
921    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
922}
923pub struct MacroItems {
924    pub(crate) syntax: SyntaxNode,
925}
926impl ast::HasModuleItem for MacroItems {}
927impl MacroItems {}
928pub struct MacroPat {
929    pub(crate) syntax: SyntaxNode,
930}
931impl MacroPat {
932    #[inline]
933    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
934}
935pub struct MacroRules {
936    pub(crate) syntax: SyntaxNode,
937}
938impl ast::HasAttrs for MacroRules {}
939impl ast::HasDocComments for MacroRules {}
940impl ast::HasName for MacroRules {}
941impl ast::HasVisibility for MacroRules {}
942impl MacroRules {
943    #[inline]
944    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
945    #[inline]
946    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
947    #[inline]
948    pub fn macro_rules_token(&self) -> Option<SyntaxToken> {
949        support::token(&self.syntax, T![macro_rules])
950    }
951}
952pub struct MacroStmts {
953    pub(crate) syntax: SyntaxNode,
954}
955impl MacroStmts {
956    #[inline]
957    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
958    #[inline]
959    pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
960}
961pub struct MacroType {
962    pub(crate) syntax: SyntaxNode,
963}
964impl MacroType {
965    #[inline]
966    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
967}
968pub struct MatchArm {
969    pub(crate) syntax: SyntaxNode,
970}
971impl ast::HasAttrs for MatchArm {}
972impl MatchArm {
973    #[inline]
974    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
975    #[inline]
976    pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
977    #[inline]
978    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
979    #[inline]
980    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
981    #[inline]
982    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
983}
984pub struct MatchArmList {
985    pub(crate) syntax: SyntaxNode,
986}
987impl ast::HasAttrs for MatchArmList {}
988impl MatchArmList {
989    #[inline]
990    pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
991    #[inline]
992    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
993    #[inline]
994    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
995}
996pub struct MatchExpr {
997    pub(crate) syntax: SyntaxNode,
998}
999impl ast::HasAttrs for MatchExpr {}
1000impl MatchExpr {
1001    #[inline]
1002    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1003    #[inline]
1004    pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
1005    #[inline]
1006    pub fn match_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![match]) }
1007}
1008pub struct MatchGuard {
1009    pub(crate) syntax: SyntaxNode,
1010}
1011impl MatchGuard {
1012    #[inline]
1013    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
1014}
1015pub struct Meta {
1016    pub(crate) syntax: SyntaxNode,
1017}
1018impl Meta {
1019    #[inline]
1020    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1021    #[inline]
1022    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1023    #[inline]
1024    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1025    #[inline]
1026    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1027    #[inline]
1028    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1029    #[inline]
1030    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1031    #[inline]
1032    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1033}
1034pub struct MethodCallExpr {
1035    pub(crate) syntax: SyntaxNode,
1036}
1037impl ast::HasArgList for MethodCallExpr {}
1038impl ast::HasAttrs for MethodCallExpr {}
1039impl ast::HasGenericArgs for MethodCallExpr {}
1040impl MethodCallExpr {
1041    #[inline]
1042    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1043    #[inline]
1044    pub fn receiver(&self) -> Option<Expr> { support::child(&self.syntax) }
1045    #[inline]
1046    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1047}
1048pub struct Module {
1049    pub(crate) syntax: SyntaxNode,
1050}
1051impl ast::HasAttrs for Module {}
1052impl ast::HasDocComments for Module {}
1053impl ast::HasName for Module {}
1054impl ast::HasVisibility for Module {}
1055impl Module {
1056    #[inline]
1057    pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
1058    #[inline]
1059    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1060    #[inline]
1061    pub fn mod_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mod]) }
1062}
1063pub struct Name {
1064    pub(crate) syntax: SyntaxNode,
1065}
1066impl Name {
1067    #[inline]
1068    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1069    #[inline]
1070    pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1071}
1072pub struct NameRef {
1073    pub(crate) syntax: SyntaxNode,
1074}
1075impl NameRef {
1076    #[inline]
1077    pub fn Self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![Self]) }
1078    #[inline]
1079    pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
1080    #[inline]
1081    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1082    #[inline]
1083    pub fn int_number_token(&self) -> Option<SyntaxToken> {
1084        support::token(&self.syntax, T![int_number])
1085    }
1086    #[inline]
1087    pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1088    #[inline]
1089    pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
1090}
1091pub struct NeverType {
1092    pub(crate) syntax: SyntaxNode,
1093}
1094impl NeverType {
1095    #[inline]
1096    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1097}
1098pub struct OffsetOfExpr {
1099    pub(crate) syntax: SyntaxNode,
1100}
1101impl ast::HasAttrs for OffsetOfExpr {}
1102impl OffsetOfExpr {
1103    #[inline]
1104    pub fn fields(&self) -> AstChildren<NameRef> { support::children(&self.syntax) }
1105    #[inline]
1106    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1107    #[inline]
1108    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
1109    #[inline]
1110    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1111    #[inline]
1112    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1113    #[inline]
1114    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1115    #[inline]
1116    pub fn builtin_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![builtin]) }
1117    #[inline]
1118    pub fn offset_of_token(&self) -> Option<SyntaxToken> {
1119        support::token(&self.syntax, T![offset_of])
1120    }
1121}
1122pub struct OrPat {
1123    pub(crate) syntax: SyntaxNode,
1124}
1125impl OrPat {
1126    #[inline]
1127    pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1128    #[inline]
1129    pub fn pipe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![|]) }
1130}
1131pub struct Param {
1132    pub(crate) syntax: SyntaxNode,
1133}
1134impl ast::HasAttrs for Param {}
1135impl Param {
1136    #[inline]
1137    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1138    #[inline]
1139    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1140    #[inline]
1141    pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
1142    #[inline]
1143    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1144}
1145pub struct ParamList {
1146    pub(crate) syntax: SyntaxNode,
1147}
1148impl ParamList {
1149    #[inline]
1150    pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
1151    #[inline]
1152    pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
1153    #[inline]
1154    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1155    #[inline]
1156    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1157    #[inline]
1158    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1159    #[inline]
1160    pub fn pipe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![|]) }
1161}
1162pub struct ParenExpr {
1163    pub(crate) syntax: SyntaxNode,
1164}
1165impl ast::HasAttrs for ParenExpr {}
1166impl ParenExpr {
1167    #[inline]
1168    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1169    #[inline]
1170    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1171    #[inline]
1172    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1173}
1174pub struct ParenPat {
1175    pub(crate) syntax: SyntaxNode,
1176}
1177impl ParenPat {
1178    #[inline]
1179    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1180    #[inline]
1181    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1182    #[inline]
1183    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1184}
1185pub struct ParenType {
1186    pub(crate) syntax: SyntaxNode,
1187}
1188impl ParenType {
1189    #[inline]
1190    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1191    #[inline]
1192    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1193    #[inline]
1194    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1195}
1196pub struct ParenthesizedArgList {
1197    pub(crate) syntax: SyntaxNode,
1198}
1199impl ParenthesizedArgList {
1200    #[inline]
1201    pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) }
1202    #[inline]
1203    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1204    #[inline]
1205    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1206    #[inline]
1207    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1208}
1209pub struct Path {
1210    pub(crate) syntax: SyntaxNode,
1211}
1212impl Path {
1213    #[inline]
1214    pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) }
1215    #[inline]
1216    pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) }
1217    #[inline]
1218    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1219}
1220pub struct PathExpr {
1221    pub(crate) syntax: SyntaxNode,
1222}
1223impl ast::HasAttrs for PathExpr {}
1224impl PathExpr {
1225    #[inline]
1226    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1227}
1228pub struct PathPat {
1229    pub(crate) syntax: SyntaxNode,
1230}
1231impl PathPat {
1232    #[inline]
1233    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1234}
1235pub struct PathSegment {
1236    pub(crate) syntax: SyntaxNode,
1237}
1238impl ast::HasGenericArgs for PathSegment {}
1239impl PathSegment {
1240    #[inline]
1241    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1242    #[inline]
1243    pub fn parenthesized_arg_list(&self) -> Option<ParenthesizedArgList> {
1244        support::child(&self.syntax)
1245    }
1246    #[inline]
1247    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
1248    #[inline]
1249    pub fn return_type_syntax(&self) -> Option<ReturnTypeSyntax> { support::child(&self.syntax) }
1250    #[inline]
1251    pub fn type_anchor(&self) -> Option<TypeAnchor> { support::child(&self.syntax) }
1252    #[inline]
1253    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1254}
1255pub struct PathType {
1256    pub(crate) syntax: SyntaxNode,
1257}
1258impl PathType {
1259    #[inline]
1260    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1261}
1262pub struct PrefixExpr {
1263    pub(crate) syntax: SyntaxNode,
1264}
1265impl ast::HasAttrs for PrefixExpr {}
1266impl PrefixExpr {
1267    #[inline]
1268    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1269}
1270pub struct PtrType {
1271    pub(crate) syntax: SyntaxNode,
1272}
1273impl PtrType {
1274    #[inline]
1275    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1276    #[inline]
1277    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
1278    #[inline]
1279    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1280    #[inline]
1281    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1282}
1283pub struct RangeExpr {
1284    pub(crate) syntax: SyntaxNode,
1285}
1286impl ast::HasAttrs for RangeExpr {}
1287impl RangeExpr {}
1288pub struct RangePat {
1289    pub(crate) syntax: SyntaxNode,
1290}
1291impl RangePat {}
1292pub struct RecordExpr {
1293    pub(crate) syntax: SyntaxNode,
1294}
1295impl RecordExpr {
1296    #[inline]
1297    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1298    #[inline]
1299    pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> {
1300        support::child(&self.syntax)
1301    }
1302}
1303pub struct RecordExprField {
1304    pub(crate) syntax: SyntaxNode,
1305}
1306impl ast::HasAttrs for RecordExprField {}
1307impl RecordExprField {
1308    #[inline]
1309    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1310    #[inline]
1311    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1312    #[inline]
1313    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1314}
1315pub struct RecordExprFieldList {
1316    pub(crate) syntax: SyntaxNode,
1317}
1318impl ast::HasAttrs for RecordExprFieldList {}
1319impl RecordExprFieldList {
1320    #[inline]
1321    pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) }
1322    #[inline]
1323    pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
1324    #[inline]
1325    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1326    #[inline]
1327    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1328    #[inline]
1329    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1330}
1331pub struct RecordField {
1332    pub(crate) syntax: SyntaxNode,
1333}
1334impl ast::HasAttrs for RecordField {}
1335impl ast::HasDocComments for RecordField {}
1336impl ast::HasName for RecordField {}
1337impl ast::HasVisibility for RecordField {}
1338impl RecordField {
1339    #[inline]
1340    pub fn default_val(&self) -> Option<ConstArg> { support::child(&self.syntax) }
1341    #[inline]
1342    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1343    #[inline]
1344    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1345    #[inline]
1346    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1347    #[inline]
1348    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1349}
1350pub struct RecordFieldList {
1351    pub(crate) syntax: SyntaxNode,
1352}
1353impl RecordFieldList {
1354    #[inline]
1355    pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) }
1356    #[inline]
1357    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1358    #[inline]
1359    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1360}
1361pub struct RecordPat {
1362    pub(crate) syntax: SyntaxNode,
1363}
1364impl RecordPat {
1365    #[inline]
1366    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1367    #[inline]
1368    pub fn record_pat_field_list(&self) -> Option<RecordPatFieldList> {
1369        support::child(&self.syntax)
1370    }
1371}
1372pub struct RecordPatField {
1373    pub(crate) syntax: SyntaxNode,
1374}
1375impl ast::HasAttrs for RecordPatField {}
1376impl RecordPatField {
1377    #[inline]
1378    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1379    #[inline]
1380    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1381    #[inline]
1382    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1383}
1384pub struct RecordPatFieldList {
1385    pub(crate) syntax: SyntaxNode,
1386}
1387impl RecordPatFieldList {
1388    #[inline]
1389    pub fn fields(&self) -> AstChildren<RecordPatField> { support::children(&self.syntax) }
1390    #[inline]
1391    pub fn rest_pat(&self) -> Option<RestPat> { support::child(&self.syntax) }
1392    #[inline]
1393    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1394    #[inline]
1395    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1396}
1397pub struct RefExpr {
1398    pub(crate) syntax: SyntaxNode,
1399}
1400impl ast::HasAttrs for RefExpr {}
1401impl RefExpr {
1402    #[inline]
1403    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1404    #[inline]
1405    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1406    #[inline]
1407    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1408    #[inline]
1409    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1410    #[inline]
1411    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
1412}
1413pub struct RefPat {
1414    pub(crate) syntax: SyntaxNode,
1415}
1416impl RefPat {
1417    #[inline]
1418    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1419    #[inline]
1420    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1421    #[inline]
1422    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1423}
1424pub struct RefType {
1425    pub(crate) syntax: SyntaxNode,
1426}
1427impl RefType {
1428    #[inline]
1429    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1430    #[inline]
1431    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1432    #[inline]
1433    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1434    #[inline]
1435    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1436}
1437pub struct Rename {
1438    pub(crate) syntax: SyntaxNode,
1439}
1440impl ast::HasName for Rename {}
1441impl Rename {
1442    #[inline]
1443    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1444    #[inline]
1445    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1446}
1447pub struct RestPat {
1448    pub(crate) syntax: SyntaxNode,
1449}
1450impl ast::HasAttrs for RestPat {}
1451impl RestPat {
1452    #[inline]
1453    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1454}
1455pub struct RetType {
1456    pub(crate) syntax: SyntaxNode,
1457}
1458impl RetType {
1459    #[inline]
1460    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1461    #[inline]
1462    pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
1463}
1464pub struct ReturnExpr {
1465    pub(crate) syntax: SyntaxNode,
1466}
1467impl ast::HasAttrs for ReturnExpr {}
1468impl ReturnExpr {
1469    #[inline]
1470    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1471    #[inline]
1472    pub fn return_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![return]) }
1473}
1474pub struct ReturnTypeSyntax {
1475    pub(crate) syntax: SyntaxNode,
1476}
1477impl ReturnTypeSyntax {
1478    #[inline]
1479    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1480    #[inline]
1481    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1482    #[inline]
1483    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1484}
1485pub struct SelfParam {
1486    pub(crate) syntax: SyntaxNode,
1487}
1488impl ast::HasAttrs for SelfParam {}
1489impl ast::HasName for SelfParam {}
1490impl SelfParam {
1491    #[inline]
1492    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1493    #[inline]
1494    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1495    #[inline]
1496    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1497    #[inline]
1498    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1499    #[inline]
1500    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1501}
1502pub struct SlicePat {
1503    pub(crate) syntax: SyntaxNode,
1504}
1505impl SlicePat {
1506    #[inline]
1507    pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1508    #[inline]
1509    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1510    #[inline]
1511    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1512}
1513pub struct SliceType {
1514    pub(crate) syntax: SyntaxNode,
1515}
1516impl SliceType {
1517    #[inline]
1518    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1519    #[inline]
1520    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1521    #[inline]
1522    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1523}
1524pub struct SourceFile {
1525    pub(crate) syntax: SyntaxNode,
1526}
1527impl ast::HasAttrs for SourceFile {}
1528impl ast::HasDocComments for SourceFile {}
1529impl ast::HasModuleItem for SourceFile {}
1530impl SourceFile {
1531    #[inline]
1532    pub fn frontmatter_token(&self) -> Option<SyntaxToken> {
1533        support::token(&self.syntax, T![frontmatter])
1534    }
1535    #[inline]
1536    pub fn shebang_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![shebang]) }
1537}
1538pub struct Static {
1539    pub(crate) syntax: SyntaxNode,
1540}
1541impl ast::HasAttrs for Static {}
1542impl ast::HasDocComments for Static {}
1543impl ast::HasName for Static {}
1544impl ast::HasVisibility for Static {}
1545impl Static {
1546    #[inline]
1547    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1548    #[inline]
1549    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1550    #[inline]
1551    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1552    #[inline]
1553    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1554    #[inline]
1555    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1556    #[inline]
1557    pub fn safe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![safe]) }
1558    #[inline]
1559    pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
1560    #[inline]
1561    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1562}
1563pub struct StmtList {
1564    pub(crate) syntax: SyntaxNode,
1565}
1566impl ast::HasAttrs for StmtList {}
1567impl StmtList {
1568    #[inline]
1569    pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
1570    #[inline]
1571    pub fn tail_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1572    #[inline]
1573    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1574    #[inline]
1575    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1576}
1577pub struct Struct {
1578    pub(crate) syntax: SyntaxNode,
1579}
1580impl ast::HasAttrs for Struct {}
1581impl ast::HasDocComments for Struct {}
1582impl ast::HasGenericParams for Struct {}
1583impl ast::HasName for Struct {}
1584impl ast::HasVisibility for Struct {}
1585impl Struct {
1586    #[inline]
1587    pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
1588    #[inline]
1589    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1590    #[inline]
1591    pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) }
1592}
1593pub struct TokenTree {
1594    pub(crate) syntax: SyntaxNode,
1595}
1596impl TokenTree {
1597    #[inline]
1598    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1599    #[inline]
1600    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1601    #[inline]
1602    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1603    #[inline]
1604    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1605    #[inline]
1606    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1607    #[inline]
1608    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1609}
1610pub struct Trait {
1611    pub(crate) syntax: SyntaxNode,
1612}
1613impl ast::HasAttrs for Trait {}
1614impl ast::HasDocComments for Trait {}
1615impl ast::HasGenericParams for Trait {}
1616impl ast::HasName for Trait {}
1617impl ast::HasTypeBounds for Trait {}
1618impl ast::HasVisibility for Trait {}
1619impl Trait {
1620    #[inline]
1621    pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
1622    #[inline]
1623    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1624    #[inline]
1625    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1626    #[inline]
1627    pub fn auto_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![auto]) }
1628    #[inline]
1629    pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) }
1630    #[inline]
1631    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1632}
1633pub struct TryBlockModifier {
1634    pub(crate) syntax: SyntaxNode,
1635}
1636impl TryBlockModifier {
1637    #[inline]
1638    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1639    #[inline]
1640    pub fn bikeshed_token(&self) -> Option<SyntaxToken> {
1641        support::token(&self.syntax, T![bikeshed])
1642    }
1643    #[inline]
1644    pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
1645}
1646pub struct TryExpr {
1647    pub(crate) syntax: SyntaxNode,
1648}
1649impl ast::HasAttrs for TryExpr {}
1650impl TryExpr {
1651    #[inline]
1652    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1653    #[inline]
1654    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
1655}
1656pub struct TupleExpr {
1657    pub(crate) syntax: SyntaxNode,
1658}
1659impl ast::HasAttrs for TupleExpr {}
1660impl TupleExpr {
1661    #[inline]
1662    pub fn fields(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
1663    #[inline]
1664    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1665    #[inline]
1666    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1667}
1668pub struct TupleField {
1669    pub(crate) syntax: SyntaxNode,
1670}
1671impl ast::HasAttrs for TupleField {}
1672impl ast::HasDocComments for TupleField {}
1673impl ast::HasVisibility for TupleField {}
1674impl TupleField {
1675    #[inline]
1676    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1677}
1678pub struct TupleFieldList {
1679    pub(crate) syntax: SyntaxNode,
1680}
1681impl TupleFieldList {
1682    #[inline]
1683    pub fn fields(&self) -> AstChildren<TupleField> { support::children(&self.syntax) }
1684    #[inline]
1685    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1686    #[inline]
1687    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1688}
1689pub struct TuplePat {
1690    pub(crate) syntax: SyntaxNode,
1691}
1692impl TuplePat {
1693    #[inline]
1694    pub fn fields(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1695    #[inline]
1696    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1697    #[inline]
1698    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1699}
1700pub struct TupleStructPat {
1701    pub(crate) syntax: SyntaxNode,
1702}
1703impl TupleStructPat {
1704    #[inline]
1705    pub fn fields(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1706    #[inline]
1707    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1708    #[inline]
1709    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1710    #[inline]
1711    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1712}
1713pub struct TupleType {
1714    pub(crate) syntax: SyntaxNode,
1715}
1716impl TupleType {
1717    #[inline]
1718    pub fn fields(&self) -> AstChildren<Type> { support::children(&self.syntax) }
1719    #[inline]
1720    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1721    #[inline]
1722    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1723}
1724pub struct TypeAlias {
1725    pub(crate) syntax: SyntaxNode,
1726}
1727impl ast::HasAttrs for TypeAlias {}
1728impl ast::HasDocComments for TypeAlias {}
1729impl ast::HasGenericParams for TypeAlias {}
1730impl ast::HasName for TypeAlias {}
1731impl ast::HasTypeBounds for TypeAlias {}
1732impl ast::HasVisibility for TypeAlias {}
1733impl TypeAlias {
1734    #[inline]
1735    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1736    #[inline]
1737    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1738    #[inline]
1739    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1740    #[inline]
1741    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
1742    #[inline]
1743    pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
1744}
1745pub struct TypeAnchor {
1746    pub(crate) syntax: SyntaxNode,
1747}
1748impl TypeAnchor {
1749    #[inline]
1750    pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) }
1751    #[inline]
1752    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1753    #[inline]
1754    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
1755    #[inline]
1756    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1757    #[inline]
1758    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1759}
1760pub struct TypeArg {
1761    pub(crate) syntax: SyntaxNode,
1762}
1763impl TypeArg {
1764    #[inline]
1765    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1766}
1767pub struct TypeBound {
1768    pub(crate) syntax: SyntaxNode,
1769}
1770impl TypeBound {
1771    #[inline]
1772    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
1773    #[inline]
1774    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1775    #[inline]
1776    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1777    #[inline]
1778    pub fn use_bound_generic_args(&self) -> Option<UseBoundGenericArgs> {
1779        support::child(&self.syntax)
1780    }
1781    #[inline]
1782    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1783    #[inline]
1784    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1785    #[inline]
1786    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
1787    #[inline]
1788    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
1789    #[inline]
1790    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1791    #[inline]
1792    pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
1793    #[inline]
1794    pub fn tilde_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![~]) }
1795}
1796pub struct TypeBoundList {
1797    pub(crate) syntax: SyntaxNode,
1798}
1799impl TypeBoundList {
1800    #[inline]
1801    pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
1802}
1803pub struct TypeParam {
1804    pub(crate) syntax: SyntaxNode,
1805}
1806impl ast::HasAttrs for TypeParam {}
1807impl ast::HasName for TypeParam {}
1808impl ast::HasTypeBounds for TypeParam {}
1809impl TypeParam {
1810    #[inline]
1811    pub fn default_type(&self) -> Option<Type> { support::child(&self.syntax) }
1812    #[inline]
1813    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1814}
1815pub struct UnderscoreExpr {
1816    pub(crate) syntax: SyntaxNode,
1817}
1818impl ast::HasAttrs for UnderscoreExpr {}
1819impl UnderscoreExpr {
1820    #[inline]
1821    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1822}
1823pub struct Union {
1824    pub(crate) syntax: SyntaxNode,
1825}
1826impl ast::HasAttrs for Union {}
1827impl ast::HasDocComments for Union {}
1828impl ast::HasGenericParams for Union {}
1829impl ast::HasName for Union {}
1830impl ast::HasVisibility for Union {}
1831impl Union {
1832    #[inline]
1833    pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) }
1834    #[inline]
1835    pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) }
1836}
1837pub struct Use {
1838    pub(crate) syntax: SyntaxNode,
1839}
1840impl ast::HasAttrs for Use {}
1841impl ast::HasDocComments for Use {}
1842impl ast::HasVisibility for Use {}
1843impl Use {
1844    #[inline]
1845    pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
1846    #[inline]
1847    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1848    #[inline]
1849    pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
1850}
1851pub struct UseBoundGenericArgs {
1852    pub(crate) syntax: SyntaxNode,
1853}
1854impl UseBoundGenericArgs {
1855    #[inline]
1856    pub fn use_bound_generic_args(&self) -> AstChildren<UseBoundGenericArg> {
1857        support::children(&self.syntax)
1858    }
1859    #[inline]
1860    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
1861    #[inline]
1862    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1863}
1864pub struct UseTree {
1865    pub(crate) syntax: SyntaxNode,
1866}
1867impl UseTree {
1868    #[inline]
1869    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1870    #[inline]
1871    pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
1872    #[inline]
1873    pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
1874    #[inline]
1875    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
1876    #[inline]
1877    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1878}
1879pub struct UseTreeList {
1880    pub(crate) syntax: SyntaxNode,
1881}
1882impl UseTreeList {
1883    #[inline]
1884    pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
1885    #[inline]
1886    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1887    #[inline]
1888    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1889}
1890pub struct Variant {
1891    pub(crate) syntax: SyntaxNode,
1892}
1893impl ast::HasAttrs for Variant {}
1894impl ast::HasDocComments for Variant {}
1895impl ast::HasName for Variant {}
1896impl ast::HasVisibility for Variant {}
1897impl Variant {
1898    #[inline]
1899    pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
1900    #[inline]
1901    pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
1902    #[inline]
1903    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1904}
1905pub struct VariantList {
1906    pub(crate) syntax: SyntaxNode,
1907}
1908impl VariantList {
1909    #[inline]
1910    pub fn variants(&self) -> AstChildren<Variant> { support::children(&self.syntax) }
1911    #[inline]
1912    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1913    #[inline]
1914    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1915}
1916pub struct Visibility {
1917    pub(crate) syntax: SyntaxNode,
1918}
1919impl Visibility {
1920    #[inline]
1921    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1922    #[inline]
1923    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1924    #[inline]
1925    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1926    #[inline]
1927    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
1928    #[inline]
1929    pub fn pub_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![pub]) }
1930}
1931pub struct WhereClause {
1932    pub(crate) syntax: SyntaxNode,
1933}
1934impl WhereClause {
1935    #[inline]
1936    pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
1937    #[inline]
1938    pub fn where_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![where]) }
1939}
1940pub struct WherePred {
1941    pub(crate) syntax: SyntaxNode,
1942}
1943impl ast::HasTypeBounds for WherePred {}
1944impl WherePred {
1945    #[inline]
1946    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
1947    #[inline]
1948    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1949    #[inline]
1950    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1951}
1952pub struct WhileExpr {
1953    pub(crate) syntax: SyntaxNode,
1954}
1955impl ast::HasAttrs for WhileExpr {}
1956impl WhileExpr {
1957    #[inline]
1958    pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
1959}
1960pub struct WildcardPat {
1961    pub(crate) syntax: SyntaxNode,
1962}
1963impl WildcardPat {
1964    #[inline]
1965    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1966}
1967pub struct YeetExpr {
1968    pub(crate) syntax: SyntaxNode,
1969}
1970impl ast::HasAttrs for YeetExpr {}
1971impl YeetExpr {
1972    #[inline]
1973    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1974    #[inline]
1975    pub fn do_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![do]) }
1976    #[inline]
1977    pub fn yeet_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![yeet]) }
1978}
1979pub struct YieldExpr {
1980    pub(crate) syntax: SyntaxNode,
1981}
1982impl ast::HasAttrs for YieldExpr {}
1983impl YieldExpr {
1984    #[inline]
1985    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1986    #[inline]
1987    pub fn yield_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![yield]) }
1988}
1989
1990#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1991pub enum Adt {
1992    Enum(Enum),
1993    Struct(Struct),
1994    Union(Union),
1995}
1996impl ast::HasAttrs for Adt {}
1997impl ast::HasDocComments for Adt {}
1998impl ast::HasGenericParams for Adt {}
1999impl ast::HasName for Adt {}
2000impl ast::HasVisibility for Adt {}
2001
2002#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2003pub enum AsmOperand {
2004    AsmConst(AsmConst),
2005    AsmLabel(AsmLabel),
2006    AsmRegOperand(AsmRegOperand),
2007    AsmSym(AsmSym),
2008}
2009
2010#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2011pub enum AsmPiece {
2012    AsmClobberAbi(AsmClobberAbi),
2013    AsmOperandNamed(AsmOperandNamed),
2014    AsmOptions(AsmOptions),
2015}
2016
2017#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2018pub enum AssocItem {
2019    Const(Const),
2020    Fn(Fn),
2021    MacroCall(MacroCall),
2022    TypeAlias(TypeAlias),
2023}
2024impl ast::HasAttrs for AssocItem {}
2025impl ast::HasDocComments for AssocItem {}
2026
2027#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2028pub enum Expr {
2029    ArrayExpr(ArrayExpr),
2030    AsmExpr(AsmExpr),
2031    AwaitExpr(AwaitExpr),
2032    BecomeExpr(BecomeExpr),
2033    BinExpr(BinExpr),
2034    BlockExpr(BlockExpr),
2035    BreakExpr(BreakExpr),
2036    CallExpr(CallExpr),
2037    CastExpr(CastExpr),
2038    ClosureExpr(ClosureExpr),
2039    ContinueExpr(ContinueExpr),
2040    FieldExpr(FieldExpr),
2041    ForExpr(ForExpr),
2042    FormatArgsExpr(FormatArgsExpr),
2043    IfExpr(IfExpr),
2044    IndexExpr(IndexExpr),
2045    LetExpr(LetExpr),
2046    Literal(Literal),
2047    LoopExpr(LoopExpr),
2048    MacroExpr(MacroExpr),
2049    MatchExpr(MatchExpr),
2050    MethodCallExpr(MethodCallExpr),
2051    OffsetOfExpr(OffsetOfExpr),
2052    ParenExpr(ParenExpr),
2053    PathExpr(PathExpr),
2054    PrefixExpr(PrefixExpr),
2055    RangeExpr(RangeExpr),
2056    RecordExpr(RecordExpr),
2057    RefExpr(RefExpr),
2058    ReturnExpr(ReturnExpr),
2059    TryExpr(TryExpr),
2060    TupleExpr(TupleExpr),
2061    UnderscoreExpr(UnderscoreExpr),
2062    WhileExpr(WhileExpr),
2063    YeetExpr(YeetExpr),
2064    YieldExpr(YieldExpr),
2065}
2066
2067#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2068pub enum ExternItem {
2069    Fn(Fn),
2070    MacroCall(MacroCall),
2071    Static(Static),
2072    TypeAlias(TypeAlias),
2073}
2074impl ast::HasAttrs for ExternItem {}
2075impl ast::HasDocComments for ExternItem {}
2076
2077#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2078pub enum FieldList {
2079    RecordFieldList(RecordFieldList),
2080    TupleFieldList(TupleFieldList),
2081}
2082
2083#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2084pub enum GenericArg {
2085    AssocTypeArg(AssocTypeArg),
2086    ConstArg(ConstArg),
2087    LifetimeArg(LifetimeArg),
2088    TypeArg(TypeArg),
2089}
2090
2091#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2092pub enum GenericParam {
2093    ConstParam(ConstParam),
2094    LifetimeParam(LifetimeParam),
2095    TypeParam(TypeParam),
2096}
2097impl ast::HasAttrs for GenericParam {}
2098
2099#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2100pub enum Item {
2101    AsmExpr(AsmExpr),
2102    Const(Const),
2103    Enum(Enum),
2104    ExternBlock(ExternBlock),
2105    ExternCrate(ExternCrate),
2106    Fn(Fn),
2107    Impl(Impl),
2108    MacroCall(MacroCall),
2109    MacroDef(MacroDef),
2110    MacroRules(MacroRules),
2111    Module(Module),
2112    Static(Static),
2113    Struct(Struct),
2114    Trait(Trait),
2115    TypeAlias(TypeAlias),
2116    Union(Union),
2117    Use(Use),
2118}
2119impl ast::HasAttrs for Item {}
2120
2121#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2122pub enum Pat {
2123    BoxPat(BoxPat),
2124    ConstBlockPat(ConstBlockPat),
2125    IdentPat(IdentPat),
2126    LiteralPat(LiteralPat),
2127    MacroPat(MacroPat),
2128    OrPat(OrPat),
2129    ParenPat(ParenPat),
2130    PathPat(PathPat),
2131    RangePat(RangePat),
2132    RecordPat(RecordPat),
2133    RefPat(RefPat),
2134    RestPat(RestPat),
2135    SlicePat(SlicePat),
2136    TuplePat(TuplePat),
2137    TupleStructPat(TupleStructPat),
2138    WildcardPat(WildcardPat),
2139}
2140
2141#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2142pub enum Stmt {
2143    ExprStmt(ExprStmt),
2144    Item(Item),
2145    LetStmt(LetStmt),
2146}
2147
2148#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2149pub enum Type {
2150    ArrayType(ArrayType),
2151    DynTraitType(DynTraitType),
2152    FnPtrType(FnPtrType),
2153    ForType(ForType),
2154    ImplTraitType(ImplTraitType),
2155    InferType(InferType),
2156    MacroType(MacroType),
2157    NeverType(NeverType),
2158    ParenType(ParenType),
2159    PathType(PathType),
2160    PtrType(PtrType),
2161    RefType(RefType),
2162    SliceType(SliceType),
2163    TupleType(TupleType),
2164}
2165
2166#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2167pub enum UseBoundGenericArg {
2168    Lifetime(Lifetime),
2169    NameRef(NameRef),
2170}
2171
2172#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2173pub enum VariantDef {
2174    Struct(Struct),
2175    Union(Union),
2176    Variant(Variant),
2177}
2178impl ast::HasAttrs for VariantDef {}
2179impl ast::HasDocComments for VariantDef {}
2180impl ast::HasName for VariantDef {}
2181impl ast::HasVisibility for VariantDef {}
2182pub struct AnyHasArgList {
2183    pub(crate) syntax: SyntaxNode,
2184}
2185impl AnyHasArgList {
2186    #[inline]
2187    pub fn new<T: ast::HasArgList>(node: T) -> AnyHasArgList {
2188        AnyHasArgList { syntax: node.syntax().clone() }
2189    }
2190}
2191pub struct AnyHasAttrs {
2192    pub(crate) syntax: SyntaxNode,
2193}
2194impl AnyHasAttrs {
2195    #[inline]
2196    pub fn new<T: ast::HasAttrs>(node: T) -> AnyHasAttrs {
2197        AnyHasAttrs { syntax: node.syntax().clone() }
2198    }
2199}
2200pub struct AnyHasDocComments {
2201    pub(crate) syntax: SyntaxNode,
2202}
2203impl AnyHasDocComments {
2204    #[inline]
2205    pub fn new<T: ast::HasDocComments>(node: T) -> AnyHasDocComments {
2206        AnyHasDocComments { syntax: node.syntax().clone() }
2207    }
2208}
2209pub struct AnyHasGenericArgs {
2210    pub(crate) syntax: SyntaxNode,
2211}
2212impl AnyHasGenericArgs {
2213    #[inline]
2214    pub fn new<T: ast::HasGenericArgs>(node: T) -> AnyHasGenericArgs {
2215        AnyHasGenericArgs { syntax: node.syntax().clone() }
2216    }
2217}
2218pub struct AnyHasGenericParams {
2219    pub(crate) syntax: SyntaxNode,
2220}
2221impl AnyHasGenericParams {
2222    #[inline]
2223    pub fn new<T: ast::HasGenericParams>(node: T) -> AnyHasGenericParams {
2224        AnyHasGenericParams { syntax: node.syntax().clone() }
2225    }
2226}
2227pub struct AnyHasLoopBody {
2228    pub(crate) syntax: SyntaxNode,
2229}
2230impl AnyHasLoopBody {
2231    #[inline]
2232    pub fn new<T: ast::HasLoopBody>(node: T) -> AnyHasLoopBody {
2233        AnyHasLoopBody { syntax: node.syntax().clone() }
2234    }
2235}
2236pub struct AnyHasModuleItem {
2237    pub(crate) syntax: SyntaxNode,
2238}
2239impl AnyHasModuleItem {
2240    #[inline]
2241    pub fn new<T: ast::HasModuleItem>(node: T) -> AnyHasModuleItem {
2242        AnyHasModuleItem { syntax: node.syntax().clone() }
2243    }
2244}
2245pub struct AnyHasName {
2246    pub(crate) syntax: SyntaxNode,
2247}
2248impl AnyHasName {
2249    #[inline]
2250    pub fn new<T: ast::HasName>(node: T) -> AnyHasName {
2251        AnyHasName { syntax: node.syntax().clone() }
2252    }
2253}
2254pub struct AnyHasTypeBounds {
2255    pub(crate) syntax: SyntaxNode,
2256}
2257impl AnyHasTypeBounds {
2258    #[inline]
2259    pub fn new<T: ast::HasTypeBounds>(node: T) -> AnyHasTypeBounds {
2260        AnyHasTypeBounds { syntax: node.syntax().clone() }
2261    }
2262}
2263pub struct AnyHasVisibility {
2264    pub(crate) syntax: SyntaxNode,
2265}
2266impl AnyHasVisibility {
2267    #[inline]
2268    pub fn new<T: ast::HasVisibility>(node: T) -> AnyHasVisibility {
2269        AnyHasVisibility { syntax: node.syntax().clone() }
2270    }
2271}
2272impl AstNode for Abi {
2273    #[inline]
2274    fn kind() -> SyntaxKind
2275    where
2276        Self: Sized,
2277    {
2278        ABI
2279    }
2280    #[inline]
2281    fn can_cast(kind: SyntaxKind) -> bool { kind == ABI }
2282    #[inline]
2283    fn cast(syntax: SyntaxNode) -> Option<Self> {
2284        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2285    }
2286    #[inline]
2287    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2288}
2289impl hash::Hash for Abi {
2290    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2291}
2292impl Eq for Abi {}
2293impl PartialEq for Abi {
2294    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2295}
2296impl Clone for Abi {
2297    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2298}
2299impl fmt::Debug for Abi {
2300    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2301        f.debug_struct("Abi").field("syntax", &self.syntax).finish()
2302    }
2303}
2304impl AstNode for ArgList {
2305    #[inline]
2306    fn kind() -> SyntaxKind
2307    where
2308        Self: Sized,
2309    {
2310        ARG_LIST
2311    }
2312    #[inline]
2313    fn can_cast(kind: SyntaxKind) -> bool { kind == ARG_LIST }
2314    #[inline]
2315    fn cast(syntax: SyntaxNode) -> Option<Self> {
2316        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2317    }
2318    #[inline]
2319    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2320}
2321impl hash::Hash for ArgList {
2322    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2323}
2324impl Eq for ArgList {}
2325impl PartialEq for ArgList {
2326    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2327}
2328impl Clone for ArgList {
2329    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2330}
2331impl fmt::Debug for ArgList {
2332    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2333        f.debug_struct("ArgList").field("syntax", &self.syntax).finish()
2334    }
2335}
2336impl AstNode for ArrayExpr {
2337    #[inline]
2338    fn kind() -> SyntaxKind
2339    where
2340        Self: Sized,
2341    {
2342        ARRAY_EXPR
2343    }
2344    #[inline]
2345    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR }
2346    #[inline]
2347    fn cast(syntax: SyntaxNode) -> Option<Self> {
2348        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2349    }
2350    #[inline]
2351    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2352}
2353impl hash::Hash for ArrayExpr {
2354    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2355}
2356impl Eq for ArrayExpr {}
2357impl PartialEq for ArrayExpr {
2358    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2359}
2360impl Clone for ArrayExpr {
2361    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2362}
2363impl fmt::Debug for ArrayExpr {
2364    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2365        f.debug_struct("ArrayExpr").field("syntax", &self.syntax).finish()
2366    }
2367}
2368impl AstNode for ArrayType {
2369    #[inline]
2370    fn kind() -> SyntaxKind
2371    where
2372        Self: Sized,
2373    {
2374        ARRAY_TYPE
2375    }
2376    #[inline]
2377    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE }
2378    #[inline]
2379    fn cast(syntax: SyntaxNode) -> Option<Self> {
2380        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2381    }
2382    #[inline]
2383    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2384}
2385impl hash::Hash for ArrayType {
2386    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2387}
2388impl Eq for ArrayType {}
2389impl PartialEq for ArrayType {
2390    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2391}
2392impl Clone for ArrayType {
2393    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2394}
2395impl fmt::Debug for ArrayType {
2396    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2397        f.debug_struct("ArrayType").field("syntax", &self.syntax).finish()
2398    }
2399}
2400impl AstNode for AsmClobberAbi {
2401    #[inline]
2402    fn kind() -> SyntaxKind
2403    where
2404        Self: Sized,
2405    {
2406        ASM_CLOBBER_ABI
2407    }
2408    #[inline]
2409    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_CLOBBER_ABI }
2410    #[inline]
2411    fn cast(syntax: SyntaxNode) -> Option<Self> {
2412        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2413    }
2414    #[inline]
2415    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2416}
2417impl hash::Hash for AsmClobberAbi {
2418    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2419}
2420impl Eq for AsmClobberAbi {}
2421impl PartialEq for AsmClobberAbi {
2422    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2423}
2424impl Clone for AsmClobberAbi {
2425    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2426}
2427impl fmt::Debug for AsmClobberAbi {
2428    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2429        f.debug_struct("AsmClobberAbi").field("syntax", &self.syntax).finish()
2430    }
2431}
2432impl AstNode for AsmConst {
2433    #[inline]
2434    fn kind() -> SyntaxKind
2435    where
2436        Self: Sized,
2437    {
2438        ASM_CONST
2439    }
2440    #[inline]
2441    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_CONST }
2442    #[inline]
2443    fn cast(syntax: SyntaxNode) -> Option<Self> {
2444        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2445    }
2446    #[inline]
2447    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2448}
2449impl hash::Hash for AsmConst {
2450    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2451}
2452impl Eq for AsmConst {}
2453impl PartialEq for AsmConst {
2454    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2455}
2456impl Clone for AsmConst {
2457    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2458}
2459impl fmt::Debug for AsmConst {
2460    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2461        f.debug_struct("AsmConst").field("syntax", &self.syntax).finish()
2462    }
2463}
2464impl AstNode for AsmDirSpec {
2465    #[inline]
2466    fn kind() -> SyntaxKind
2467    where
2468        Self: Sized,
2469    {
2470        ASM_DIR_SPEC
2471    }
2472    #[inline]
2473    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_DIR_SPEC }
2474    #[inline]
2475    fn cast(syntax: SyntaxNode) -> Option<Self> {
2476        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2477    }
2478    #[inline]
2479    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2480}
2481impl hash::Hash for AsmDirSpec {
2482    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2483}
2484impl Eq for AsmDirSpec {}
2485impl PartialEq for AsmDirSpec {
2486    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2487}
2488impl Clone for AsmDirSpec {
2489    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2490}
2491impl fmt::Debug for AsmDirSpec {
2492    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2493        f.debug_struct("AsmDirSpec").field("syntax", &self.syntax).finish()
2494    }
2495}
2496impl AstNode for AsmExpr {
2497    #[inline]
2498    fn kind() -> SyntaxKind
2499    where
2500        Self: Sized,
2501    {
2502        ASM_EXPR
2503    }
2504    #[inline]
2505    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_EXPR }
2506    #[inline]
2507    fn cast(syntax: SyntaxNode) -> Option<Self> {
2508        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2509    }
2510    #[inline]
2511    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2512}
2513impl hash::Hash for AsmExpr {
2514    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2515}
2516impl Eq for AsmExpr {}
2517impl PartialEq for AsmExpr {
2518    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2519}
2520impl Clone for AsmExpr {
2521    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2522}
2523impl fmt::Debug for AsmExpr {
2524    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2525        f.debug_struct("AsmExpr").field("syntax", &self.syntax).finish()
2526    }
2527}
2528impl AstNode for AsmLabel {
2529    #[inline]
2530    fn kind() -> SyntaxKind
2531    where
2532        Self: Sized,
2533    {
2534        ASM_LABEL
2535    }
2536    #[inline]
2537    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_LABEL }
2538    #[inline]
2539    fn cast(syntax: SyntaxNode) -> Option<Self> {
2540        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2541    }
2542    #[inline]
2543    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2544}
2545impl hash::Hash for AsmLabel {
2546    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2547}
2548impl Eq for AsmLabel {}
2549impl PartialEq for AsmLabel {
2550    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2551}
2552impl Clone for AsmLabel {
2553    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2554}
2555impl fmt::Debug for AsmLabel {
2556    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2557        f.debug_struct("AsmLabel").field("syntax", &self.syntax).finish()
2558    }
2559}
2560impl AstNode for AsmOperandExpr {
2561    #[inline]
2562    fn kind() -> SyntaxKind
2563    where
2564        Self: Sized,
2565    {
2566        ASM_OPERAND_EXPR
2567    }
2568    #[inline]
2569    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPERAND_EXPR }
2570    #[inline]
2571    fn cast(syntax: SyntaxNode) -> Option<Self> {
2572        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2573    }
2574    #[inline]
2575    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2576}
2577impl hash::Hash for AsmOperandExpr {
2578    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2579}
2580impl Eq for AsmOperandExpr {}
2581impl PartialEq for AsmOperandExpr {
2582    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2583}
2584impl Clone for AsmOperandExpr {
2585    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2586}
2587impl fmt::Debug for AsmOperandExpr {
2588    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2589        f.debug_struct("AsmOperandExpr").field("syntax", &self.syntax).finish()
2590    }
2591}
2592impl AstNode for AsmOperandNamed {
2593    #[inline]
2594    fn kind() -> SyntaxKind
2595    where
2596        Self: Sized,
2597    {
2598        ASM_OPERAND_NAMED
2599    }
2600    #[inline]
2601    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPERAND_NAMED }
2602    #[inline]
2603    fn cast(syntax: SyntaxNode) -> Option<Self> {
2604        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2605    }
2606    #[inline]
2607    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2608}
2609impl hash::Hash for AsmOperandNamed {
2610    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2611}
2612impl Eq for AsmOperandNamed {}
2613impl PartialEq for AsmOperandNamed {
2614    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2615}
2616impl Clone for AsmOperandNamed {
2617    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2618}
2619impl fmt::Debug for AsmOperandNamed {
2620    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2621        f.debug_struct("AsmOperandNamed").field("syntax", &self.syntax).finish()
2622    }
2623}
2624impl AstNode for AsmOption {
2625    #[inline]
2626    fn kind() -> SyntaxKind
2627    where
2628        Self: Sized,
2629    {
2630        ASM_OPTION
2631    }
2632    #[inline]
2633    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPTION }
2634    #[inline]
2635    fn cast(syntax: SyntaxNode) -> Option<Self> {
2636        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2637    }
2638    #[inline]
2639    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2640}
2641impl hash::Hash for AsmOption {
2642    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2643}
2644impl Eq for AsmOption {}
2645impl PartialEq for AsmOption {
2646    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2647}
2648impl Clone for AsmOption {
2649    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2650}
2651impl fmt::Debug for AsmOption {
2652    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2653        f.debug_struct("AsmOption").field("syntax", &self.syntax).finish()
2654    }
2655}
2656impl AstNode for AsmOptions {
2657    #[inline]
2658    fn kind() -> SyntaxKind
2659    where
2660        Self: Sized,
2661    {
2662        ASM_OPTIONS
2663    }
2664    #[inline]
2665    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPTIONS }
2666    #[inline]
2667    fn cast(syntax: SyntaxNode) -> Option<Self> {
2668        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2669    }
2670    #[inline]
2671    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2672}
2673impl hash::Hash for AsmOptions {
2674    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2675}
2676impl Eq for AsmOptions {}
2677impl PartialEq for AsmOptions {
2678    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2679}
2680impl Clone for AsmOptions {
2681    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2682}
2683impl fmt::Debug for AsmOptions {
2684    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2685        f.debug_struct("AsmOptions").field("syntax", &self.syntax).finish()
2686    }
2687}
2688impl AstNode for AsmRegOperand {
2689    #[inline]
2690    fn kind() -> SyntaxKind
2691    where
2692        Self: Sized,
2693    {
2694        ASM_REG_OPERAND
2695    }
2696    #[inline]
2697    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_REG_OPERAND }
2698    #[inline]
2699    fn cast(syntax: SyntaxNode) -> Option<Self> {
2700        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2701    }
2702    #[inline]
2703    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2704}
2705impl hash::Hash for AsmRegOperand {
2706    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2707}
2708impl Eq for AsmRegOperand {}
2709impl PartialEq for AsmRegOperand {
2710    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2711}
2712impl Clone for AsmRegOperand {
2713    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2714}
2715impl fmt::Debug for AsmRegOperand {
2716    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2717        f.debug_struct("AsmRegOperand").field("syntax", &self.syntax).finish()
2718    }
2719}
2720impl AstNode for AsmRegSpec {
2721    #[inline]
2722    fn kind() -> SyntaxKind
2723    where
2724        Self: Sized,
2725    {
2726        ASM_REG_SPEC
2727    }
2728    #[inline]
2729    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_REG_SPEC }
2730    #[inline]
2731    fn cast(syntax: SyntaxNode) -> Option<Self> {
2732        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2733    }
2734    #[inline]
2735    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2736}
2737impl hash::Hash for AsmRegSpec {
2738    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2739}
2740impl Eq for AsmRegSpec {}
2741impl PartialEq for AsmRegSpec {
2742    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2743}
2744impl Clone for AsmRegSpec {
2745    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2746}
2747impl fmt::Debug for AsmRegSpec {
2748    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2749        f.debug_struct("AsmRegSpec").field("syntax", &self.syntax).finish()
2750    }
2751}
2752impl AstNode for AsmSym {
2753    #[inline]
2754    fn kind() -> SyntaxKind
2755    where
2756        Self: Sized,
2757    {
2758        ASM_SYM
2759    }
2760    #[inline]
2761    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_SYM }
2762    #[inline]
2763    fn cast(syntax: SyntaxNode) -> Option<Self> {
2764        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2765    }
2766    #[inline]
2767    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2768}
2769impl hash::Hash for AsmSym {
2770    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2771}
2772impl Eq for AsmSym {}
2773impl PartialEq for AsmSym {
2774    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2775}
2776impl Clone for AsmSym {
2777    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2778}
2779impl fmt::Debug for AsmSym {
2780    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2781        f.debug_struct("AsmSym").field("syntax", &self.syntax).finish()
2782    }
2783}
2784impl AstNode for AssocItemList {
2785    #[inline]
2786    fn kind() -> SyntaxKind
2787    where
2788        Self: Sized,
2789    {
2790        ASSOC_ITEM_LIST
2791    }
2792    #[inline]
2793    fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_ITEM_LIST }
2794    #[inline]
2795    fn cast(syntax: SyntaxNode) -> Option<Self> {
2796        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2797    }
2798    #[inline]
2799    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2800}
2801impl hash::Hash for AssocItemList {
2802    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2803}
2804impl Eq for AssocItemList {}
2805impl PartialEq for AssocItemList {
2806    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2807}
2808impl Clone for AssocItemList {
2809    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2810}
2811impl fmt::Debug for AssocItemList {
2812    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2813        f.debug_struct("AssocItemList").field("syntax", &self.syntax).finish()
2814    }
2815}
2816impl AstNode for AssocTypeArg {
2817    #[inline]
2818    fn kind() -> SyntaxKind
2819    where
2820        Self: Sized,
2821    {
2822        ASSOC_TYPE_ARG
2823    }
2824    #[inline]
2825    fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_TYPE_ARG }
2826    #[inline]
2827    fn cast(syntax: SyntaxNode) -> Option<Self> {
2828        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2829    }
2830    #[inline]
2831    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2832}
2833impl hash::Hash for AssocTypeArg {
2834    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2835}
2836impl Eq for AssocTypeArg {}
2837impl PartialEq for AssocTypeArg {
2838    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2839}
2840impl Clone for AssocTypeArg {
2841    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2842}
2843impl fmt::Debug for AssocTypeArg {
2844    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2845        f.debug_struct("AssocTypeArg").field("syntax", &self.syntax).finish()
2846    }
2847}
2848impl AstNode for Attr {
2849    #[inline]
2850    fn kind() -> SyntaxKind
2851    where
2852        Self: Sized,
2853    {
2854        ATTR
2855    }
2856    #[inline]
2857    fn can_cast(kind: SyntaxKind) -> bool { kind == ATTR }
2858    #[inline]
2859    fn cast(syntax: SyntaxNode) -> Option<Self> {
2860        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2861    }
2862    #[inline]
2863    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2864}
2865impl hash::Hash for Attr {
2866    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2867}
2868impl Eq for Attr {}
2869impl PartialEq for Attr {
2870    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2871}
2872impl Clone for Attr {
2873    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2874}
2875impl fmt::Debug for Attr {
2876    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2877        f.debug_struct("Attr").field("syntax", &self.syntax).finish()
2878    }
2879}
2880impl AstNode for AwaitExpr {
2881    #[inline]
2882    fn kind() -> SyntaxKind
2883    where
2884        Self: Sized,
2885    {
2886        AWAIT_EXPR
2887    }
2888    #[inline]
2889    fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR }
2890    #[inline]
2891    fn cast(syntax: SyntaxNode) -> Option<Self> {
2892        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2893    }
2894    #[inline]
2895    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2896}
2897impl hash::Hash for AwaitExpr {
2898    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2899}
2900impl Eq for AwaitExpr {}
2901impl PartialEq for AwaitExpr {
2902    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2903}
2904impl Clone for AwaitExpr {
2905    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2906}
2907impl fmt::Debug for AwaitExpr {
2908    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2909        f.debug_struct("AwaitExpr").field("syntax", &self.syntax).finish()
2910    }
2911}
2912impl AstNode for BecomeExpr {
2913    #[inline]
2914    fn kind() -> SyntaxKind
2915    where
2916        Self: Sized,
2917    {
2918        BECOME_EXPR
2919    }
2920    #[inline]
2921    fn can_cast(kind: SyntaxKind) -> bool { kind == BECOME_EXPR }
2922    #[inline]
2923    fn cast(syntax: SyntaxNode) -> Option<Self> {
2924        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2925    }
2926    #[inline]
2927    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2928}
2929impl hash::Hash for BecomeExpr {
2930    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2931}
2932impl Eq for BecomeExpr {}
2933impl PartialEq for BecomeExpr {
2934    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2935}
2936impl Clone for BecomeExpr {
2937    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2938}
2939impl fmt::Debug for BecomeExpr {
2940    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2941        f.debug_struct("BecomeExpr").field("syntax", &self.syntax).finish()
2942    }
2943}
2944impl AstNode for BinExpr {
2945    #[inline]
2946    fn kind() -> SyntaxKind
2947    where
2948        Self: Sized,
2949    {
2950        BIN_EXPR
2951    }
2952    #[inline]
2953    fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR }
2954    #[inline]
2955    fn cast(syntax: SyntaxNode) -> Option<Self> {
2956        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2957    }
2958    #[inline]
2959    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2960}
2961impl hash::Hash for BinExpr {
2962    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2963}
2964impl Eq for BinExpr {}
2965impl PartialEq for BinExpr {
2966    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2967}
2968impl Clone for BinExpr {
2969    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2970}
2971impl fmt::Debug for BinExpr {
2972    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2973        f.debug_struct("BinExpr").field("syntax", &self.syntax).finish()
2974    }
2975}
2976impl AstNode for BlockExpr {
2977    #[inline]
2978    fn kind() -> SyntaxKind
2979    where
2980        Self: Sized,
2981    {
2982        BLOCK_EXPR
2983    }
2984    #[inline]
2985    fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK_EXPR }
2986    #[inline]
2987    fn cast(syntax: SyntaxNode) -> Option<Self> {
2988        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2989    }
2990    #[inline]
2991    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2992}
2993impl hash::Hash for BlockExpr {
2994    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2995}
2996impl Eq for BlockExpr {}
2997impl PartialEq for BlockExpr {
2998    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2999}
3000impl Clone for BlockExpr {
3001    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3002}
3003impl fmt::Debug for BlockExpr {
3004    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3005        f.debug_struct("BlockExpr").field("syntax", &self.syntax).finish()
3006    }
3007}
3008impl AstNode for BoxPat {
3009    #[inline]
3010    fn kind() -> SyntaxKind
3011    where
3012        Self: Sized,
3013    {
3014        BOX_PAT
3015    }
3016    #[inline]
3017    fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_PAT }
3018    #[inline]
3019    fn cast(syntax: SyntaxNode) -> Option<Self> {
3020        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3021    }
3022    #[inline]
3023    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3024}
3025impl hash::Hash for BoxPat {
3026    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3027}
3028impl Eq for BoxPat {}
3029impl PartialEq for BoxPat {
3030    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3031}
3032impl Clone for BoxPat {
3033    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3034}
3035impl fmt::Debug for BoxPat {
3036    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3037        f.debug_struct("BoxPat").field("syntax", &self.syntax).finish()
3038    }
3039}
3040impl AstNode for BreakExpr {
3041    #[inline]
3042    fn kind() -> SyntaxKind
3043    where
3044        Self: Sized,
3045    {
3046        BREAK_EXPR
3047    }
3048    #[inline]
3049    fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR }
3050    #[inline]
3051    fn cast(syntax: SyntaxNode) -> Option<Self> {
3052        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3053    }
3054    #[inline]
3055    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3056}
3057impl hash::Hash for BreakExpr {
3058    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3059}
3060impl Eq for BreakExpr {}
3061impl PartialEq for BreakExpr {
3062    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3063}
3064impl Clone for BreakExpr {
3065    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3066}
3067impl fmt::Debug for BreakExpr {
3068    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3069        f.debug_struct("BreakExpr").field("syntax", &self.syntax).finish()
3070    }
3071}
3072impl AstNode for CallExpr {
3073    #[inline]
3074    fn kind() -> SyntaxKind
3075    where
3076        Self: Sized,
3077    {
3078        CALL_EXPR
3079    }
3080    #[inline]
3081    fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR }
3082    #[inline]
3083    fn cast(syntax: SyntaxNode) -> Option<Self> {
3084        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3085    }
3086    #[inline]
3087    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3088}
3089impl hash::Hash for CallExpr {
3090    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3091}
3092impl Eq for CallExpr {}
3093impl PartialEq for CallExpr {
3094    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3095}
3096impl Clone for CallExpr {
3097    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3098}
3099impl fmt::Debug for CallExpr {
3100    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3101        f.debug_struct("CallExpr").field("syntax", &self.syntax).finish()
3102    }
3103}
3104impl AstNode for CastExpr {
3105    #[inline]
3106    fn kind() -> SyntaxKind
3107    where
3108        Self: Sized,
3109    {
3110        CAST_EXPR
3111    }
3112    #[inline]
3113    fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR }
3114    #[inline]
3115    fn cast(syntax: SyntaxNode) -> Option<Self> {
3116        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3117    }
3118    #[inline]
3119    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3120}
3121impl hash::Hash for CastExpr {
3122    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3123}
3124impl Eq for CastExpr {}
3125impl PartialEq for CastExpr {
3126    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3127}
3128impl Clone for CastExpr {
3129    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3130}
3131impl fmt::Debug for CastExpr {
3132    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3133        f.debug_struct("CastExpr").field("syntax", &self.syntax).finish()
3134    }
3135}
3136impl AstNode for ClosureExpr {
3137    #[inline]
3138    fn kind() -> SyntaxKind
3139    where
3140        Self: Sized,
3141    {
3142        CLOSURE_EXPR
3143    }
3144    #[inline]
3145    fn can_cast(kind: SyntaxKind) -> bool { kind == CLOSURE_EXPR }
3146    #[inline]
3147    fn cast(syntax: SyntaxNode) -> Option<Self> {
3148        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3149    }
3150    #[inline]
3151    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3152}
3153impl hash::Hash for ClosureExpr {
3154    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3155}
3156impl Eq for ClosureExpr {}
3157impl PartialEq for ClosureExpr {
3158    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3159}
3160impl Clone for ClosureExpr {
3161    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3162}
3163impl fmt::Debug for ClosureExpr {
3164    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3165        f.debug_struct("ClosureExpr").field("syntax", &self.syntax).finish()
3166    }
3167}
3168impl AstNode for Const {
3169    #[inline]
3170    fn kind() -> SyntaxKind
3171    where
3172        Self: Sized,
3173    {
3174        CONST
3175    }
3176    #[inline]
3177    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST }
3178    #[inline]
3179    fn cast(syntax: SyntaxNode) -> Option<Self> {
3180        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3181    }
3182    #[inline]
3183    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3184}
3185impl hash::Hash for Const {
3186    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3187}
3188impl Eq for Const {}
3189impl PartialEq for Const {
3190    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3191}
3192impl Clone for Const {
3193    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3194}
3195impl fmt::Debug for Const {
3196    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3197        f.debug_struct("Const").field("syntax", &self.syntax).finish()
3198    }
3199}
3200impl AstNode for ConstArg {
3201    #[inline]
3202    fn kind() -> SyntaxKind
3203    where
3204        Self: Sized,
3205    {
3206        CONST_ARG
3207    }
3208    #[inline]
3209    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_ARG }
3210    #[inline]
3211    fn cast(syntax: SyntaxNode) -> Option<Self> {
3212        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3213    }
3214    #[inline]
3215    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3216}
3217impl hash::Hash for ConstArg {
3218    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3219}
3220impl Eq for ConstArg {}
3221impl PartialEq for ConstArg {
3222    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3223}
3224impl Clone for ConstArg {
3225    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3226}
3227impl fmt::Debug for ConstArg {
3228    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3229        f.debug_struct("ConstArg").field("syntax", &self.syntax).finish()
3230    }
3231}
3232impl AstNode for ConstBlockPat {
3233    #[inline]
3234    fn kind() -> SyntaxKind
3235    where
3236        Self: Sized,
3237    {
3238        CONST_BLOCK_PAT
3239    }
3240    #[inline]
3241    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_BLOCK_PAT }
3242    #[inline]
3243    fn cast(syntax: SyntaxNode) -> Option<Self> {
3244        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3245    }
3246    #[inline]
3247    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3248}
3249impl hash::Hash for ConstBlockPat {
3250    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3251}
3252impl Eq for ConstBlockPat {}
3253impl PartialEq for ConstBlockPat {
3254    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3255}
3256impl Clone for ConstBlockPat {
3257    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3258}
3259impl fmt::Debug for ConstBlockPat {
3260    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3261        f.debug_struct("ConstBlockPat").field("syntax", &self.syntax).finish()
3262    }
3263}
3264impl AstNode for ConstParam {
3265    #[inline]
3266    fn kind() -> SyntaxKind
3267    where
3268        Self: Sized,
3269    {
3270        CONST_PARAM
3271    }
3272    #[inline]
3273    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM }
3274    #[inline]
3275    fn cast(syntax: SyntaxNode) -> Option<Self> {
3276        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3277    }
3278    #[inline]
3279    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3280}
3281impl hash::Hash for ConstParam {
3282    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3283}
3284impl Eq for ConstParam {}
3285impl PartialEq for ConstParam {
3286    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3287}
3288impl Clone for ConstParam {
3289    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3290}
3291impl fmt::Debug for ConstParam {
3292    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3293        f.debug_struct("ConstParam").field("syntax", &self.syntax).finish()
3294    }
3295}
3296impl AstNode for ContinueExpr {
3297    #[inline]
3298    fn kind() -> SyntaxKind
3299    where
3300        Self: Sized,
3301    {
3302        CONTINUE_EXPR
3303    }
3304    #[inline]
3305    fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR }
3306    #[inline]
3307    fn cast(syntax: SyntaxNode) -> Option<Self> {
3308        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3309    }
3310    #[inline]
3311    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3312}
3313impl hash::Hash for ContinueExpr {
3314    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3315}
3316impl Eq for ContinueExpr {}
3317impl PartialEq for ContinueExpr {
3318    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3319}
3320impl Clone for ContinueExpr {
3321    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3322}
3323impl fmt::Debug for ContinueExpr {
3324    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3325        f.debug_struct("ContinueExpr").field("syntax", &self.syntax).finish()
3326    }
3327}
3328impl AstNode for DynTraitType {
3329    #[inline]
3330    fn kind() -> SyntaxKind
3331    where
3332        Self: Sized,
3333    {
3334        DYN_TRAIT_TYPE
3335    }
3336    #[inline]
3337    fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE }
3338    #[inline]
3339    fn cast(syntax: SyntaxNode) -> Option<Self> {
3340        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3341    }
3342    #[inline]
3343    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3344}
3345impl hash::Hash for DynTraitType {
3346    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3347}
3348impl Eq for DynTraitType {}
3349impl PartialEq for DynTraitType {
3350    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3351}
3352impl Clone for DynTraitType {
3353    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3354}
3355impl fmt::Debug for DynTraitType {
3356    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3357        f.debug_struct("DynTraitType").field("syntax", &self.syntax).finish()
3358    }
3359}
3360impl AstNode for Enum {
3361    #[inline]
3362    fn kind() -> SyntaxKind
3363    where
3364        Self: Sized,
3365    {
3366        ENUM
3367    }
3368    #[inline]
3369    fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM }
3370    #[inline]
3371    fn cast(syntax: SyntaxNode) -> Option<Self> {
3372        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3373    }
3374    #[inline]
3375    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3376}
3377impl hash::Hash for Enum {
3378    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3379}
3380impl Eq for Enum {}
3381impl PartialEq for Enum {
3382    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3383}
3384impl Clone for Enum {
3385    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3386}
3387impl fmt::Debug for Enum {
3388    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3389        f.debug_struct("Enum").field("syntax", &self.syntax).finish()
3390    }
3391}
3392impl AstNode for ExprStmt {
3393    #[inline]
3394    fn kind() -> SyntaxKind
3395    where
3396        Self: Sized,
3397    {
3398        EXPR_STMT
3399    }
3400    #[inline]
3401    fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
3402    #[inline]
3403    fn cast(syntax: SyntaxNode) -> Option<Self> {
3404        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3405    }
3406    #[inline]
3407    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3408}
3409impl hash::Hash for ExprStmt {
3410    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3411}
3412impl Eq for ExprStmt {}
3413impl PartialEq for ExprStmt {
3414    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3415}
3416impl Clone for ExprStmt {
3417    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3418}
3419impl fmt::Debug for ExprStmt {
3420    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3421        f.debug_struct("ExprStmt").field("syntax", &self.syntax).finish()
3422    }
3423}
3424impl AstNode for ExternBlock {
3425    #[inline]
3426    fn kind() -> SyntaxKind
3427    where
3428        Self: Sized,
3429    {
3430        EXTERN_BLOCK
3431    }
3432    #[inline]
3433    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_BLOCK }
3434    #[inline]
3435    fn cast(syntax: SyntaxNode) -> Option<Self> {
3436        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3437    }
3438    #[inline]
3439    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3440}
3441impl hash::Hash for ExternBlock {
3442    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3443}
3444impl Eq for ExternBlock {}
3445impl PartialEq for ExternBlock {
3446    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3447}
3448impl Clone for ExternBlock {
3449    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3450}
3451impl fmt::Debug for ExternBlock {
3452    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3453        f.debug_struct("ExternBlock").field("syntax", &self.syntax).finish()
3454    }
3455}
3456impl AstNode for ExternCrate {
3457    #[inline]
3458    fn kind() -> SyntaxKind
3459    where
3460        Self: Sized,
3461    {
3462        EXTERN_CRATE
3463    }
3464    #[inline]
3465    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_CRATE }
3466    #[inline]
3467    fn cast(syntax: SyntaxNode) -> Option<Self> {
3468        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3469    }
3470    #[inline]
3471    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3472}
3473impl hash::Hash for ExternCrate {
3474    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3475}
3476impl Eq for ExternCrate {}
3477impl PartialEq for ExternCrate {
3478    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3479}
3480impl Clone for ExternCrate {
3481    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3482}
3483impl fmt::Debug for ExternCrate {
3484    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3485        f.debug_struct("ExternCrate").field("syntax", &self.syntax).finish()
3486    }
3487}
3488impl AstNode for ExternItemList {
3489    #[inline]
3490    fn kind() -> SyntaxKind
3491    where
3492        Self: Sized,
3493    {
3494        EXTERN_ITEM_LIST
3495    }
3496    #[inline]
3497    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST }
3498    #[inline]
3499    fn cast(syntax: SyntaxNode) -> Option<Self> {
3500        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3501    }
3502    #[inline]
3503    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3504}
3505impl hash::Hash for ExternItemList {
3506    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3507}
3508impl Eq for ExternItemList {}
3509impl PartialEq for ExternItemList {
3510    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3511}
3512impl Clone for ExternItemList {
3513    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3514}
3515impl fmt::Debug for ExternItemList {
3516    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3517        f.debug_struct("ExternItemList").field("syntax", &self.syntax).finish()
3518    }
3519}
3520impl AstNode for FieldExpr {
3521    #[inline]
3522    fn kind() -> SyntaxKind
3523    where
3524        Self: Sized,
3525    {
3526        FIELD_EXPR
3527    }
3528    #[inline]
3529    fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR }
3530    #[inline]
3531    fn cast(syntax: SyntaxNode) -> Option<Self> {
3532        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3533    }
3534    #[inline]
3535    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3536}
3537impl hash::Hash for FieldExpr {
3538    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3539}
3540impl Eq for FieldExpr {}
3541impl PartialEq for FieldExpr {
3542    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3543}
3544impl Clone for FieldExpr {
3545    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3546}
3547impl fmt::Debug for FieldExpr {
3548    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3549        f.debug_struct("FieldExpr").field("syntax", &self.syntax).finish()
3550    }
3551}
3552impl AstNode for Fn {
3553    #[inline]
3554    fn kind() -> SyntaxKind
3555    where
3556        Self: Sized,
3557    {
3558        FN
3559    }
3560    #[inline]
3561    fn can_cast(kind: SyntaxKind) -> bool { kind == FN }
3562    #[inline]
3563    fn cast(syntax: SyntaxNode) -> Option<Self> {
3564        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3565    }
3566    #[inline]
3567    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3568}
3569impl hash::Hash for Fn {
3570    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3571}
3572impl Eq for Fn {}
3573impl PartialEq for Fn {
3574    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3575}
3576impl Clone for Fn {
3577    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3578}
3579impl fmt::Debug for Fn {
3580    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3581        f.debug_struct("Fn").field("syntax", &self.syntax).finish()
3582    }
3583}
3584impl AstNode for FnPtrType {
3585    #[inline]
3586    fn kind() -> SyntaxKind
3587    where
3588        Self: Sized,
3589    {
3590        FN_PTR_TYPE
3591    }
3592    #[inline]
3593    fn can_cast(kind: SyntaxKind) -> bool { kind == FN_PTR_TYPE }
3594    #[inline]
3595    fn cast(syntax: SyntaxNode) -> Option<Self> {
3596        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3597    }
3598    #[inline]
3599    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3600}
3601impl hash::Hash for FnPtrType {
3602    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3603}
3604impl Eq for FnPtrType {}
3605impl PartialEq for FnPtrType {
3606    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3607}
3608impl Clone for FnPtrType {
3609    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3610}
3611impl fmt::Debug for FnPtrType {
3612    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3613        f.debug_struct("FnPtrType").field("syntax", &self.syntax).finish()
3614    }
3615}
3616impl AstNode for ForBinder {
3617    #[inline]
3618    fn kind() -> SyntaxKind
3619    where
3620        Self: Sized,
3621    {
3622        FOR_BINDER
3623    }
3624    #[inline]
3625    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_BINDER }
3626    #[inline]
3627    fn cast(syntax: SyntaxNode) -> Option<Self> {
3628        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3629    }
3630    #[inline]
3631    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3632}
3633impl hash::Hash for ForBinder {
3634    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3635}
3636impl Eq for ForBinder {}
3637impl PartialEq for ForBinder {
3638    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3639}
3640impl Clone for ForBinder {
3641    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3642}
3643impl fmt::Debug for ForBinder {
3644    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3645        f.debug_struct("ForBinder").field("syntax", &self.syntax).finish()
3646    }
3647}
3648impl AstNode for ForExpr {
3649    #[inline]
3650    fn kind() -> SyntaxKind
3651    where
3652        Self: Sized,
3653    {
3654        FOR_EXPR
3655    }
3656    #[inline]
3657    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR }
3658    #[inline]
3659    fn cast(syntax: SyntaxNode) -> Option<Self> {
3660        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3661    }
3662    #[inline]
3663    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3664}
3665impl hash::Hash for ForExpr {
3666    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3667}
3668impl Eq for ForExpr {}
3669impl PartialEq for ForExpr {
3670    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3671}
3672impl Clone for ForExpr {
3673    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3674}
3675impl fmt::Debug for ForExpr {
3676    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3677        f.debug_struct("ForExpr").field("syntax", &self.syntax).finish()
3678    }
3679}
3680impl AstNode for ForType {
3681    #[inline]
3682    fn kind() -> SyntaxKind
3683    where
3684        Self: Sized,
3685    {
3686        FOR_TYPE
3687    }
3688    #[inline]
3689    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE }
3690    #[inline]
3691    fn cast(syntax: SyntaxNode) -> Option<Self> {
3692        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3693    }
3694    #[inline]
3695    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3696}
3697impl hash::Hash for ForType {
3698    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3699}
3700impl Eq for ForType {}
3701impl PartialEq for ForType {
3702    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3703}
3704impl Clone for ForType {
3705    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3706}
3707impl fmt::Debug for ForType {
3708    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3709        f.debug_struct("ForType").field("syntax", &self.syntax).finish()
3710    }
3711}
3712impl AstNode for FormatArgsArg {
3713    #[inline]
3714    fn kind() -> SyntaxKind
3715    where
3716        Self: Sized,
3717    {
3718        FORMAT_ARGS_ARG
3719    }
3720    #[inline]
3721    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_ARG }
3722    #[inline]
3723    fn cast(syntax: SyntaxNode) -> Option<Self> {
3724        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3725    }
3726    #[inline]
3727    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3728}
3729impl hash::Hash for FormatArgsArg {
3730    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3731}
3732impl Eq for FormatArgsArg {}
3733impl PartialEq for FormatArgsArg {
3734    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3735}
3736impl Clone for FormatArgsArg {
3737    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3738}
3739impl fmt::Debug for FormatArgsArg {
3740    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3741        f.debug_struct("FormatArgsArg").field("syntax", &self.syntax).finish()
3742    }
3743}
3744impl AstNode for FormatArgsArgName {
3745    #[inline]
3746    fn kind() -> SyntaxKind
3747    where
3748        Self: Sized,
3749    {
3750        FORMAT_ARGS_ARG_NAME
3751    }
3752    #[inline]
3753    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_ARG_NAME }
3754    #[inline]
3755    fn cast(syntax: SyntaxNode) -> Option<Self> {
3756        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3757    }
3758    #[inline]
3759    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3760}
3761impl hash::Hash for FormatArgsArgName {
3762    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3763}
3764impl Eq for FormatArgsArgName {}
3765impl PartialEq for FormatArgsArgName {
3766    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3767}
3768impl Clone for FormatArgsArgName {
3769    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3770}
3771impl fmt::Debug for FormatArgsArgName {
3772    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3773        f.debug_struct("FormatArgsArgName").field("syntax", &self.syntax).finish()
3774    }
3775}
3776impl AstNode for FormatArgsExpr {
3777    #[inline]
3778    fn kind() -> SyntaxKind
3779    where
3780        Self: Sized,
3781    {
3782        FORMAT_ARGS_EXPR
3783    }
3784    #[inline]
3785    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_EXPR }
3786    #[inline]
3787    fn cast(syntax: SyntaxNode) -> Option<Self> {
3788        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3789    }
3790    #[inline]
3791    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3792}
3793impl hash::Hash for FormatArgsExpr {
3794    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3795}
3796impl Eq for FormatArgsExpr {}
3797impl PartialEq for FormatArgsExpr {
3798    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3799}
3800impl Clone for FormatArgsExpr {
3801    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3802}
3803impl fmt::Debug for FormatArgsExpr {
3804    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3805        f.debug_struct("FormatArgsExpr").field("syntax", &self.syntax).finish()
3806    }
3807}
3808impl AstNode for GenericArgList {
3809    #[inline]
3810    fn kind() -> SyntaxKind
3811    where
3812        Self: Sized,
3813    {
3814        GENERIC_ARG_LIST
3815    }
3816    #[inline]
3817    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_ARG_LIST }
3818    #[inline]
3819    fn cast(syntax: SyntaxNode) -> Option<Self> {
3820        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3821    }
3822    #[inline]
3823    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3824}
3825impl hash::Hash for GenericArgList {
3826    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3827}
3828impl Eq for GenericArgList {}
3829impl PartialEq for GenericArgList {
3830    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3831}
3832impl Clone for GenericArgList {
3833    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3834}
3835impl fmt::Debug for GenericArgList {
3836    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3837        f.debug_struct("GenericArgList").field("syntax", &self.syntax).finish()
3838    }
3839}
3840impl AstNode for GenericParamList {
3841    #[inline]
3842    fn kind() -> SyntaxKind
3843    where
3844        Self: Sized,
3845    {
3846        GENERIC_PARAM_LIST
3847    }
3848    #[inline]
3849    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST }
3850    #[inline]
3851    fn cast(syntax: SyntaxNode) -> Option<Self> {
3852        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3853    }
3854    #[inline]
3855    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3856}
3857impl hash::Hash for GenericParamList {
3858    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3859}
3860impl Eq for GenericParamList {}
3861impl PartialEq for GenericParamList {
3862    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3863}
3864impl Clone for GenericParamList {
3865    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3866}
3867impl fmt::Debug for GenericParamList {
3868    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3869        f.debug_struct("GenericParamList").field("syntax", &self.syntax).finish()
3870    }
3871}
3872impl AstNode for IdentPat {
3873    #[inline]
3874    fn kind() -> SyntaxKind
3875    where
3876        Self: Sized,
3877    {
3878        IDENT_PAT
3879    }
3880    #[inline]
3881    fn can_cast(kind: SyntaxKind) -> bool { kind == IDENT_PAT }
3882    #[inline]
3883    fn cast(syntax: SyntaxNode) -> Option<Self> {
3884        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3885    }
3886    #[inline]
3887    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3888}
3889impl hash::Hash for IdentPat {
3890    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3891}
3892impl Eq for IdentPat {}
3893impl PartialEq for IdentPat {
3894    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3895}
3896impl Clone for IdentPat {
3897    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3898}
3899impl fmt::Debug for IdentPat {
3900    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3901        f.debug_struct("IdentPat").field("syntax", &self.syntax).finish()
3902    }
3903}
3904impl AstNode for IfExpr {
3905    #[inline]
3906    fn kind() -> SyntaxKind
3907    where
3908        Self: Sized,
3909    {
3910        IF_EXPR
3911    }
3912    #[inline]
3913    fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR }
3914    #[inline]
3915    fn cast(syntax: SyntaxNode) -> Option<Self> {
3916        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3917    }
3918    #[inline]
3919    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3920}
3921impl hash::Hash for IfExpr {
3922    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3923}
3924impl Eq for IfExpr {}
3925impl PartialEq for IfExpr {
3926    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3927}
3928impl Clone for IfExpr {
3929    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3930}
3931impl fmt::Debug for IfExpr {
3932    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3933        f.debug_struct("IfExpr").field("syntax", &self.syntax).finish()
3934    }
3935}
3936impl AstNode for Impl {
3937    #[inline]
3938    fn kind() -> SyntaxKind
3939    where
3940        Self: Sized,
3941    {
3942        IMPL
3943    }
3944    #[inline]
3945    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL }
3946    #[inline]
3947    fn cast(syntax: SyntaxNode) -> Option<Self> {
3948        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3949    }
3950    #[inline]
3951    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3952}
3953impl hash::Hash for Impl {
3954    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3955}
3956impl Eq for Impl {}
3957impl PartialEq for Impl {
3958    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3959}
3960impl Clone for Impl {
3961    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3962}
3963impl fmt::Debug for Impl {
3964    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3965        f.debug_struct("Impl").field("syntax", &self.syntax).finish()
3966    }
3967}
3968impl AstNode for ImplTraitType {
3969    #[inline]
3970    fn kind() -> SyntaxKind
3971    where
3972        Self: Sized,
3973    {
3974        IMPL_TRAIT_TYPE
3975    }
3976    #[inline]
3977    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE }
3978    #[inline]
3979    fn cast(syntax: SyntaxNode) -> Option<Self> {
3980        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3981    }
3982    #[inline]
3983    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3984}
3985impl hash::Hash for ImplTraitType {
3986    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3987}
3988impl Eq for ImplTraitType {}
3989impl PartialEq for ImplTraitType {
3990    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3991}
3992impl Clone for ImplTraitType {
3993    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3994}
3995impl fmt::Debug for ImplTraitType {
3996    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3997        f.debug_struct("ImplTraitType").field("syntax", &self.syntax).finish()
3998    }
3999}
4000impl AstNode for IndexExpr {
4001    #[inline]
4002    fn kind() -> SyntaxKind
4003    where
4004        Self: Sized,
4005    {
4006        INDEX_EXPR
4007    }
4008    #[inline]
4009    fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR }
4010    #[inline]
4011    fn cast(syntax: SyntaxNode) -> Option<Self> {
4012        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4013    }
4014    #[inline]
4015    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4016}
4017impl hash::Hash for IndexExpr {
4018    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4019}
4020impl Eq for IndexExpr {}
4021impl PartialEq for IndexExpr {
4022    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4023}
4024impl Clone for IndexExpr {
4025    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4026}
4027impl fmt::Debug for IndexExpr {
4028    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4029        f.debug_struct("IndexExpr").field("syntax", &self.syntax).finish()
4030    }
4031}
4032impl AstNode for InferType {
4033    #[inline]
4034    fn kind() -> SyntaxKind
4035    where
4036        Self: Sized,
4037    {
4038        INFER_TYPE
4039    }
4040    #[inline]
4041    fn can_cast(kind: SyntaxKind) -> bool { kind == INFER_TYPE }
4042    #[inline]
4043    fn cast(syntax: SyntaxNode) -> Option<Self> {
4044        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4045    }
4046    #[inline]
4047    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4048}
4049impl hash::Hash for InferType {
4050    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4051}
4052impl Eq for InferType {}
4053impl PartialEq for InferType {
4054    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4055}
4056impl Clone for InferType {
4057    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4058}
4059impl fmt::Debug for InferType {
4060    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4061        f.debug_struct("InferType").field("syntax", &self.syntax).finish()
4062    }
4063}
4064impl AstNode for ItemList {
4065    #[inline]
4066    fn kind() -> SyntaxKind
4067    where
4068        Self: Sized,
4069    {
4070        ITEM_LIST
4071    }
4072    #[inline]
4073    fn can_cast(kind: SyntaxKind) -> bool { kind == ITEM_LIST }
4074    #[inline]
4075    fn cast(syntax: SyntaxNode) -> Option<Self> {
4076        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4077    }
4078    #[inline]
4079    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4080}
4081impl hash::Hash for ItemList {
4082    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4083}
4084impl Eq for ItemList {}
4085impl PartialEq for ItemList {
4086    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4087}
4088impl Clone for ItemList {
4089    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4090}
4091impl fmt::Debug for ItemList {
4092    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4093        f.debug_struct("ItemList").field("syntax", &self.syntax).finish()
4094    }
4095}
4096impl AstNode for Label {
4097    #[inline]
4098    fn kind() -> SyntaxKind
4099    where
4100        Self: Sized,
4101    {
4102        LABEL
4103    }
4104    #[inline]
4105    fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL }
4106    #[inline]
4107    fn cast(syntax: SyntaxNode) -> Option<Self> {
4108        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4109    }
4110    #[inline]
4111    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4112}
4113impl hash::Hash for Label {
4114    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4115}
4116impl Eq for Label {}
4117impl PartialEq for Label {
4118    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4119}
4120impl Clone for Label {
4121    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4122}
4123impl fmt::Debug for Label {
4124    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4125        f.debug_struct("Label").field("syntax", &self.syntax).finish()
4126    }
4127}
4128impl AstNode for LetElse {
4129    #[inline]
4130    fn kind() -> SyntaxKind
4131    where
4132        Self: Sized,
4133    {
4134        LET_ELSE
4135    }
4136    #[inline]
4137    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_ELSE }
4138    #[inline]
4139    fn cast(syntax: SyntaxNode) -> Option<Self> {
4140        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4141    }
4142    #[inline]
4143    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4144}
4145impl hash::Hash for LetElse {
4146    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4147}
4148impl Eq for LetElse {}
4149impl PartialEq for LetElse {
4150    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4151}
4152impl Clone for LetElse {
4153    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4154}
4155impl fmt::Debug for LetElse {
4156    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4157        f.debug_struct("LetElse").field("syntax", &self.syntax).finish()
4158    }
4159}
4160impl AstNode for LetExpr {
4161    #[inline]
4162    fn kind() -> SyntaxKind
4163    where
4164        Self: Sized,
4165    {
4166        LET_EXPR
4167    }
4168    #[inline]
4169    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_EXPR }
4170    #[inline]
4171    fn cast(syntax: SyntaxNode) -> Option<Self> {
4172        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4173    }
4174    #[inline]
4175    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4176}
4177impl hash::Hash for LetExpr {
4178    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4179}
4180impl Eq for LetExpr {}
4181impl PartialEq for LetExpr {
4182    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4183}
4184impl Clone for LetExpr {
4185    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4186}
4187impl fmt::Debug for LetExpr {
4188    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4189        f.debug_struct("LetExpr").field("syntax", &self.syntax).finish()
4190    }
4191}
4192impl AstNode for LetStmt {
4193    #[inline]
4194    fn kind() -> SyntaxKind
4195    where
4196        Self: Sized,
4197    {
4198        LET_STMT
4199    }
4200    #[inline]
4201    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT }
4202    #[inline]
4203    fn cast(syntax: SyntaxNode) -> Option<Self> {
4204        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4205    }
4206    #[inline]
4207    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4208}
4209impl hash::Hash for LetStmt {
4210    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4211}
4212impl Eq for LetStmt {}
4213impl PartialEq for LetStmt {
4214    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4215}
4216impl Clone for LetStmt {
4217    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4218}
4219impl fmt::Debug for LetStmt {
4220    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4221        f.debug_struct("LetStmt").field("syntax", &self.syntax).finish()
4222    }
4223}
4224impl AstNode for Lifetime {
4225    #[inline]
4226    fn kind() -> SyntaxKind
4227    where
4228        Self: Sized,
4229    {
4230        LIFETIME
4231    }
4232    #[inline]
4233    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME }
4234    #[inline]
4235    fn cast(syntax: SyntaxNode) -> Option<Self> {
4236        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4237    }
4238    #[inline]
4239    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4240}
4241impl hash::Hash for Lifetime {
4242    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4243}
4244impl Eq for Lifetime {}
4245impl PartialEq for Lifetime {
4246    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4247}
4248impl Clone for Lifetime {
4249    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4250}
4251impl fmt::Debug for Lifetime {
4252    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4253        f.debug_struct("Lifetime").field("syntax", &self.syntax).finish()
4254    }
4255}
4256impl AstNode for LifetimeArg {
4257    #[inline]
4258    fn kind() -> SyntaxKind
4259    where
4260        Self: Sized,
4261    {
4262        LIFETIME_ARG
4263    }
4264    #[inline]
4265    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_ARG }
4266    #[inline]
4267    fn cast(syntax: SyntaxNode) -> Option<Self> {
4268        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4269    }
4270    #[inline]
4271    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4272}
4273impl hash::Hash for LifetimeArg {
4274    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4275}
4276impl Eq for LifetimeArg {}
4277impl PartialEq for LifetimeArg {
4278    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4279}
4280impl Clone for LifetimeArg {
4281    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4282}
4283impl fmt::Debug for LifetimeArg {
4284    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4285        f.debug_struct("LifetimeArg").field("syntax", &self.syntax).finish()
4286    }
4287}
4288impl AstNode for LifetimeParam {
4289    #[inline]
4290    fn kind() -> SyntaxKind
4291    where
4292        Self: Sized,
4293    {
4294        LIFETIME_PARAM
4295    }
4296    #[inline]
4297    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM }
4298    #[inline]
4299    fn cast(syntax: SyntaxNode) -> Option<Self> {
4300        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4301    }
4302    #[inline]
4303    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4304}
4305impl hash::Hash for LifetimeParam {
4306    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4307}
4308impl Eq for LifetimeParam {}
4309impl PartialEq for LifetimeParam {
4310    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4311}
4312impl Clone for LifetimeParam {
4313    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4314}
4315impl fmt::Debug for LifetimeParam {
4316    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4317        f.debug_struct("LifetimeParam").field("syntax", &self.syntax).finish()
4318    }
4319}
4320impl AstNode for Literal {
4321    #[inline]
4322    fn kind() -> SyntaxKind
4323    where
4324        Self: Sized,
4325    {
4326        LITERAL
4327    }
4328    #[inline]
4329    fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL }
4330    #[inline]
4331    fn cast(syntax: SyntaxNode) -> Option<Self> {
4332        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4333    }
4334    #[inline]
4335    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4336}
4337impl hash::Hash for Literal {
4338    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4339}
4340impl Eq for Literal {}
4341impl PartialEq for Literal {
4342    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4343}
4344impl Clone for Literal {
4345    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4346}
4347impl fmt::Debug for Literal {
4348    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4349        f.debug_struct("Literal").field("syntax", &self.syntax).finish()
4350    }
4351}
4352impl AstNode for LiteralPat {
4353    #[inline]
4354    fn kind() -> SyntaxKind
4355    where
4356        Self: Sized,
4357    {
4358        LITERAL_PAT
4359    }
4360    #[inline]
4361    fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL_PAT }
4362    #[inline]
4363    fn cast(syntax: SyntaxNode) -> Option<Self> {
4364        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4365    }
4366    #[inline]
4367    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4368}
4369impl hash::Hash for LiteralPat {
4370    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4371}
4372impl Eq for LiteralPat {}
4373impl PartialEq for LiteralPat {
4374    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4375}
4376impl Clone for LiteralPat {
4377    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4378}
4379impl fmt::Debug for LiteralPat {
4380    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4381        f.debug_struct("LiteralPat").field("syntax", &self.syntax).finish()
4382    }
4383}
4384impl AstNode for LoopExpr {
4385    #[inline]
4386    fn kind() -> SyntaxKind
4387    where
4388        Self: Sized,
4389    {
4390        LOOP_EXPR
4391    }
4392    #[inline]
4393    fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR }
4394    #[inline]
4395    fn cast(syntax: SyntaxNode) -> Option<Self> {
4396        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4397    }
4398    #[inline]
4399    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4400}
4401impl hash::Hash for LoopExpr {
4402    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4403}
4404impl Eq for LoopExpr {}
4405impl PartialEq for LoopExpr {
4406    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4407}
4408impl Clone for LoopExpr {
4409    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4410}
4411impl fmt::Debug for LoopExpr {
4412    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4413        f.debug_struct("LoopExpr").field("syntax", &self.syntax).finish()
4414    }
4415}
4416impl AstNode for MacroCall {
4417    #[inline]
4418    fn kind() -> SyntaxKind
4419    where
4420        Self: Sized,
4421    {
4422        MACRO_CALL
4423    }
4424    #[inline]
4425    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_CALL }
4426    #[inline]
4427    fn cast(syntax: SyntaxNode) -> Option<Self> {
4428        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4429    }
4430    #[inline]
4431    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4432}
4433impl hash::Hash for MacroCall {
4434    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4435}
4436impl Eq for MacroCall {}
4437impl PartialEq for MacroCall {
4438    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4439}
4440impl Clone for MacroCall {
4441    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4442}
4443impl fmt::Debug for MacroCall {
4444    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4445        f.debug_struct("MacroCall").field("syntax", &self.syntax).finish()
4446    }
4447}
4448impl AstNode for MacroDef {
4449    #[inline]
4450    fn kind() -> SyntaxKind
4451    where
4452        Self: Sized,
4453    {
4454        MACRO_DEF
4455    }
4456    #[inline]
4457    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF }
4458    #[inline]
4459    fn cast(syntax: SyntaxNode) -> Option<Self> {
4460        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4461    }
4462    #[inline]
4463    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4464}
4465impl hash::Hash for MacroDef {
4466    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4467}
4468impl Eq for MacroDef {}
4469impl PartialEq for MacroDef {
4470    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4471}
4472impl Clone for MacroDef {
4473    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4474}
4475impl fmt::Debug for MacroDef {
4476    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4477        f.debug_struct("MacroDef").field("syntax", &self.syntax).finish()
4478    }
4479}
4480impl AstNode for MacroExpr {
4481    #[inline]
4482    fn kind() -> SyntaxKind
4483    where
4484        Self: Sized,
4485    {
4486        MACRO_EXPR
4487    }
4488    #[inline]
4489    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_EXPR }
4490    #[inline]
4491    fn cast(syntax: SyntaxNode) -> Option<Self> {
4492        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4493    }
4494    #[inline]
4495    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4496}
4497impl hash::Hash for MacroExpr {
4498    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4499}
4500impl Eq for MacroExpr {}
4501impl PartialEq for MacroExpr {
4502    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4503}
4504impl Clone for MacroExpr {
4505    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4506}
4507impl fmt::Debug for MacroExpr {
4508    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4509        f.debug_struct("MacroExpr").field("syntax", &self.syntax).finish()
4510    }
4511}
4512impl AstNode for MacroItems {
4513    #[inline]
4514    fn kind() -> SyntaxKind
4515    where
4516        Self: Sized,
4517    {
4518        MACRO_ITEMS
4519    }
4520    #[inline]
4521    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
4522    #[inline]
4523    fn cast(syntax: SyntaxNode) -> Option<Self> {
4524        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4525    }
4526    #[inline]
4527    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4528}
4529impl hash::Hash for MacroItems {
4530    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4531}
4532impl Eq for MacroItems {}
4533impl PartialEq for MacroItems {
4534    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4535}
4536impl Clone for MacroItems {
4537    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4538}
4539impl fmt::Debug for MacroItems {
4540    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4541        f.debug_struct("MacroItems").field("syntax", &self.syntax).finish()
4542    }
4543}
4544impl AstNode for MacroPat {
4545    #[inline]
4546    fn kind() -> SyntaxKind
4547    where
4548        Self: Sized,
4549    {
4550        MACRO_PAT
4551    }
4552    #[inline]
4553    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_PAT }
4554    #[inline]
4555    fn cast(syntax: SyntaxNode) -> Option<Self> {
4556        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4557    }
4558    #[inline]
4559    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4560}
4561impl hash::Hash for MacroPat {
4562    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4563}
4564impl Eq for MacroPat {}
4565impl PartialEq for MacroPat {
4566    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4567}
4568impl Clone for MacroPat {
4569    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4570}
4571impl fmt::Debug for MacroPat {
4572    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4573        f.debug_struct("MacroPat").field("syntax", &self.syntax).finish()
4574    }
4575}
4576impl AstNode for MacroRules {
4577    #[inline]
4578    fn kind() -> SyntaxKind
4579    where
4580        Self: Sized,
4581    {
4582        MACRO_RULES
4583    }
4584    #[inline]
4585    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_RULES }
4586    #[inline]
4587    fn cast(syntax: SyntaxNode) -> Option<Self> {
4588        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4589    }
4590    #[inline]
4591    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4592}
4593impl hash::Hash for MacroRules {
4594    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4595}
4596impl Eq for MacroRules {}
4597impl PartialEq for MacroRules {
4598    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4599}
4600impl Clone for MacroRules {
4601    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4602}
4603impl fmt::Debug for MacroRules {
4604    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4605        f.debug_struct("MacroRules").field("syntax", &self.syntax).finish()
4606    }
4607}
4608impl AstNode for MacroStmts {
4609    #[inline]
4610    fn kind() -> SyntaxKind
4611    where
4612        Self: Sized,
4613    {
4614        MACRO_STMTS
4615    }
4616    #[inline]
4617    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS }
4618    #[inline]
4619    fn cast(syntax: SyntaxNode) -> Option<Self> {
4620        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4621    }
4622    #[inline]
4623    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4624}
4625impl hash::Hash for MacroStmts {
4626    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4627}
4628impl Eq for MacroStmts {}
4629impl PartialEq for MacroStmts {
4630    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4631}
4632impl Clone for MacroStmts {
4633    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4634}
4635impl fmt::Debug for MacroStmts {
4636    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4637        f.debug_struct("MacroStmts").field("syntax", &self.syntax).finish()
4638    }
4639}
4640impl AstNode for MacroType {
4641    #[inline]
4642    fn kind() -> SyntaxKind
4643    where
4644        Self: Sized,
4645    {
4646        MACRO_TYPE
4647    }
4648    #[inline]
4649    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_TYPE }
4650    #[inline]
4651    fn cast(syntax: SyntaxNode) -> Option<Self> {
4652        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4653    }
4654    #[inline]
4655    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4656}
4657impl hash::Hash for MacroType {
4658    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4659}
4660impl Eq for MacroType {}
4661impl PartialEq for MacroType {
4662    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4663}
4664impl Clone for MacroType {
4665    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4666}
4667impl fmt::Debug for MacroType {
4668    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4669        f.debug_struct("MacroType").field("syntax", &self.syntax).finish()
4670    }
4671}
4672impl AstNode for MatchArm {
4673    #[inline]
4674    fn kind() -> SyntaxKind
4675    where
4676        Self: Sized,
4677    {
4678        MATCH_ARM
4679    }
4680    #[inline]
4681    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM }
4682    #[inline]
4683    fn cast(syntax: SyntaxNode) -> Option<Self> {
4684        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4685    }
4686    #[inline]
4687    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4688}
4689impl hash::Hash for MatchArm {
4690    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4691}
4692impl Eq for MatchArm {}
4693impl PartialEq for MatchArm {
4694    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4695}
4696impl Clone for MatchArm {
4697    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4698}
4699impl fmt::Debug for MatchArm {
4700    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4701        f.debug_struct("MatchArm").field("syntax", &self.syntax).finish()
4702    }
4703}
4704impl AstNode for MatchArmList {
4705    #[inline]
4706    fn kind() -> SyntaxKind
4707    where
4708        Self: Sized,
4709    {
4710        MATCH_ARM_LIST
4711    }
4712    #[inline]
4713    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST }
4714    #[inline]
4715    fn cast(syntax: SyntaxNode) -> Option<Self> {
4716        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4717    }
4718    #[inline]
4719    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4720}
4721impl hash::Hash for MatchArmList {
4722    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4723}
4724impl Eq for MatchArmList {}
4725impl PartialEq for MatchArmList {
4726    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4727}
4728impl Clone for MatchArmList {
4729    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4730}
4731impl fmt::Debug for MatchArmList {
4732    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4733        f.debug_struct("MatchArmList").field("syntax", &self.syntax).finish()
4734    }
4735}
4736impl AstNode for MatchExpr {
4737    #[inline]
4738    fn kind() -> SyntaxKind
4739    where
4740        Self: Sized,
4741    {
4742        MATCH_EXPR
4743    }
4744    #[inline]
4745    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR }
4746    #[inline]
4747    fn cast(syntax: SyntaxNode) -> Option<Self> {
4748        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4749    }
4750    #[inline]
4751    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4752}
4753impl hash::Hash for MatchExpr {
4754    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4755}
4756impl Eq for MatchExpr {}
4757impl PartialEq for MatchExpr {
4758    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4759}
4760impl Clone for MatchExpr {
4761    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4762}
4763impl fmt::Debug for MatchExpr {
4764    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4765        f.debug_struct("MatchExpr").field("syntax", &self.syntax).finish()
4766    }
4767}
4768impl AstNode for MatchGuard {
4769    #[inline]
4770    fn kind() -> SyntaxKind
4771    where
4772        Self: Sized,
4773    {
4774        MATCH_GUARD
4775    }
4776    #[inline]
4777    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD }
4778    #[inline]
4779    fn cast(syntax: SyntaxNode) -> Option<Self> {
4780        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4781    }
4782    #[inline]
4783    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4784}
4785impl hash::Hash for MatchGuard {
4786    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4787}
4788impl Eq for MatchGuard {}
4789impl PartialEq for MatchGuard {
4790    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4791}
4792impl Clone for MatchGuard {
4793    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4794}
4795impl fmt::Debug for MatchGuard {
4796    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4797        f.debug_struct("MatchGuard").field("syntax", &self.syntax).finish()
4798    }
4799}
4800impl AstNode for Meta {
4801    #[inline]
4802    fn kind() -> SyntaxKind
4803    where
4804        Self: Sized,
4805    {
4806        META
4807    }
4808    #[inline]
4809    fn can_cast(kind: SyntaxKind) -> bool { kind == META }
4810    #[inline]
4811    fn cast(syntax: SyntaxNode) -> Option<Self> {
4812        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4813    }
4814    #[inline]
4815    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4816}
4817impl hash::Hash for Meta {
4818    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4819}
4820impl Eq for Meta {}
4821impl PartialEq for Meta {
4822    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4823}
4824impl Clone for Meta {
4825    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4826}
4827impl fmt::Debug for Meta {
4828    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4829        f.debug_struct("Meta").field("syntax", &self.syntax).finish()
4830    }
4831}
4832impl AstNode for MethodCallExpr {
4833    #[inline]
4834    fn kind() -> SyntaxKind
4835    where
4836        Self: Sized,
4837    {
4838        METHOD_CALL_EXPR
4839    }
4840    #[inline]
4841    fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR }
4842    #[inline]
4843    fn cast(syntax: SyntaxNode) -> Option<Self> {
4844        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4845    }
4846    #[inline]
4847    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4848}
4849impl hash::Hash for MethodCallExpr {
4850    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4851}
4852impl Eq for MethodCallExpr {}
4853impl PartialEq for MethodCallExpr {
4854    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4855}
4856impl Clone for MethodCallExpr {
4857    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4858}
4859impl fmt::Debug for MethodCallExpr {
4860    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4861        f.debug_struct("MethodCallExpr").field("syntax", &self.syntax).finish()
4862    }
4863}
4864impl AstNode for Module {
4865    #[inline]
4866    fn kind() -> SyntaxKind
4867    where
4868        Self: Sized,
4869    {
4870        MODULE
4871    }
4872    #[inline]
4873    fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE }
4874    #[inline]
4875    fn cast(syntax: SyntaxNode) -> Option<Self> {
4876        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4877    }
4878    #[inline]
4879    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4880}
4881impl hash::Hash for Module {
4882    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4883}
4884impl Eq for Module {}
4885impl PartialEq for Module {
4886    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4887}
4888impl Clone for Module {
4889    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4890}
4891impl fmt::Debug for Module {
4892    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4893        f.debug_struct("Module").field("syntax", &self.syntax).finish()
4894    }
4895}
4896impl AstNode for Name {
4897    #[inline]
4898    fn kind() -> SyntaxKind
4899    where
4900        Self: Sized,
4901    {
4902        NAME
4903    }
4904    #[inline]
4905    fn can_cast(kind: SyntaxKind) -> bool { kind == NAME }
4906    #[inline]
4907    fn cast(syntax: SyntaxNode) -> Option<Self> {
4908        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4909    }
4910    #[inline]
4911    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4912}
4913impl hash::Hash for Name {
4914    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4915}
4916impl Eq for Name {}
4917impl PartialEq for Name {
4918    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4919}
4920impl Clone for Name {
4921    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4922}
4923impl fmt::Debug for Name {
4924    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4925        f.debug_struct("Name").field("syntax", &self.syntax).finish()
4926    }
4927}
4928impl AstNode for NameRef {
4929    #[inline]
4930    fn kind() -> SyntaxKind
4931    where
4932        Self: Sized,
4933    {
4934        NAME_REF
4935    }
4936    #[inline]
4937    fn can_cast(kind: SyntaxKind) -> bool { kind == NAME_REF }
4938    #[inline]
4939    fn cast(syntax: SyntaxNode) -> Option<Self> {
4940        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4941    }
4942    #[inline]
4943    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4944}
4945impl hash::Hash for NameRef {
4946    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4947}
4948impl Eq for NameRef {}
4949impl PartialEq for NameRef {
4950    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4951}
4952impl Clone for NameRef {
4953    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4954}
4955impl fmt::Debug for NameRef {
4956    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4957        f.debug_struct("NameRef").field("syntax", &self.syntax).finish()
4958    }
4959}
4960impl AstNode for NeverType {
4961    #[inline]
4962    fn kind() -> SyntaxKind
4963    where
4964        Self: Sized,
4965    {
4966        NEVER_TYPE
4967    }
4968    #[inline]
4969    fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE }
4970    #[inline]
4971    fn cast(syntax: SyntaxNode) -> Option<Self> {
4972        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4973    }
4974    #[inline]
4975    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4976}
4977impl hash::Hash for NeverType {
4978    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4979}
4980impl Eq for NeverType {}
4981impl PartialEq for NeverType {
4982    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4983}
4984impl Clone for NeverType {
4985    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4986}
4987impl fmt::Debug for NeverType {
4988    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4989        f.debug_struct("NeverType").field("syntax", &self.syntax).finish()
4990    }
4991}
4992impl AstNode for OffsetOfExpr {
4993    #[inline]
4994    fn kind() -> SyntaxKind
4995    where
4996        Self: Sized,
4997    {
4998        OFFSET_OF_EXPR
4999    }
5000    #[inline]
5001    fn can_cast(kind: SyntaxKind) -> bool { kind == OFFSET_OF_EXPR }
5002    #[inline]
5003    fn cast(syntax: SyntaxNode) -> Option<Self> {
5004        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5005    }
5006    #[inline]
5007    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5008}
5009impl hash::Hash for OffsetOfExpr {
5010    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5011}
5012impl Eq for OffsetOfExpr {}
5013impl PartialEq for OffsetOfExpr {
5014    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5015}
5016impl Clone for OffsetOfExpr {
5017    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5018}
5019impl fmt::Debug for OffsetOfExpr {
5020    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5021        f.debug_struct("OffsetOfExpr").field("syntax", &self.syntax).finish()
5022    }
5023}
5024impl AstNode for OrPat {
5025    #[inline]
5026    fn kind() -> SyntaxKind
5027    where
5028        Self: Sized,
5029    {
5030        OR_PAT
5031    }
5032    #[inline]
5033    fn can_cast(kind: SyntaxKind) -> bool { kind == OR_PAT }
5034    #[inline]
5035    fn cast(syntax: SyntaxNode) -> Option<Self> {
5036        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5037    }
5038    #[inline]
5039    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5040}
5041impl hash::Hash for OrPat {
5042    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5043}
5044impl Eq for OrPat {}
5045impl PartialEq for OrPat {
5046    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5047}
5048impl Clone for OrPat {
5049    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5050}
5051impl fmt::Debug for OrPat {
5052    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5053        f.debug_struct("OrPat").field("syntax", &self.syntax).finish()
5054    }
5055}
5056impl AstNode for Param {
5057    #[inline]
5058    fn kind() -> SyntaxKind
5059    where
5060        Self: Sized,
5061    {
5062        PARAM
5063    }
5064    #[inline]
5065    fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM }
5066    #[inline]
5067    fn cast(syntax: SyntaxNode) -> Option<Self> {
5068        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5069    }
5070    #[inline]
5071    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5072}
5073impl hash::Hash for Param {
5074    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5075}
5076impl Eq for Param {}
5077impl PartialEq for Param {
5078    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5079}
5080impl Clone for Param {
5081    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5082}
5083impl fmt::Debug for Param {
5084    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5085        f.debug_struct("Param").field("syntax", &self.syntax).finish()
5086    }
5087}
5088impl AstNode for ParamList {
5089    #[inline]
5090    fn kind() -> SyntaxKind
5091    where
5092        Self: Sized,
5093    {
5094        PARAM_LIST
5095    }
5096    #[inline]
5097    fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM_LIST }
5098    #[inline]
5099    fn cast(syntax: SyntaxNode) -> Option<Self> {
5100        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5101    }
5102    #[inline]
5103    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5104}
5105impl hash::Hash for ParamList {
5106    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5107}
5108impl Eq for ParamList {}
5109impl PartialEq for ParamList {
5110    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5111}
5112impl Clone for ParamList {
5113    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5114}
5115impl fmt::Debug for ParamList {
5116    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5117        f.debug_struct("ParamList").field("syntax", &self.syntax).finish()
5118    }
5119}
5120impl AstNode for ParenExpr {
5121    #[inline]
5122    fn kind() -> SyntaxKind
5123    where
5124        Self: Sized,
5125    {
5126        PAREN_EXPR
5127    }
5128    #[inline]
5129    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR }
5130    #[inline]
5131    fn cast(syntax: SyntaxNode) -> Option<Self> {
5132        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5133    }
5134    #[inline]
5135    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5136}
5137impl hash::Hash for ParenExpr {
5138    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5139}
5140impl Eq for ParenExpr {}
5141impl PartialEq for ParenExpr {
5142    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5143}
5144impl Clone for ParenExpr {
5145    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5146}
5147impl fmt::Debug for ParenExpr {
5148    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5149        f.debug_struct("ParenExpr").field("syntax", &self.syntax).finish()
5150    }
5151}
5152impl AstNode for ParenPat {
5153    #[inline]
5154    fn kind() -> SyntaxKind
5155    where
5156        Self: Sized,
5157    {
5158        PAREN_PAT
5159    }
5160    #[inline]
5161    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_PAT }
5162    #[inline]
5163    fn cast(syntax: SyntaxNode) -> Option<Self> {
5164        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5165    }
5166    #[inline]
5167    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5168}
5169impl hash::Hash for ParenPat {
5170    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5171}
5172impl Eq for ParenPat {}
5173impl PartialEq for ParenPat {
5174    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5175}
5176impl Clone for ParenPat {
5177    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5178}
5179impl fmt::Debug for ParenPat {
5180    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5181        f.debug_struct("ParenPat").field("syntax", &self.syntax).finish()
5182    }
5183}
5184impl AstNode for ParenType {
5185    #[inline]
5186    fn kind() -> SyntaxKind
5187    where
5188        Self: Sized,
5189    {
5190        PAREN_TYPE
5191    }
5192    #[inline]
5193    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE }
5194    #[inline]
5195    fn cast(syntax: SyntaxNode) -> Option<Self> {
5196        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5197    }
5198    #[inline]
5199    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5200}
5201impl hash::Hash for ParenType {
5202    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5203}
5204impl Eq for ParenType {}
5205impl PartialEq for ParenType {
5206    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5207}
5208impl Clone for ParenType {
5209    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5210}
5211impl fmt::Debug for ParenType {
5212    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5213        f.debug_struct("ParenType").field("syntax", &self.syntax).finish()
5214    }
5215}
5216impl AstNode for ParenthesizedArgList {
5217    #[inline]
5218    fn kind() -> SyntaxKind
5219    where
5220        Self: Sized,
5221    {
5222        PARENTHESIZED_ARG_LIST
5223    }
5224    #[inline]
5225    fn can_cast(kind: SyntaxKind) -> bool { kind == PARENTHESIZED_ARG_LIST }
5226    #[inline]
5227    fn cast(syntax: SyntaxNode) -> Option<Self> {
5228        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5229    }
5230    #[inline]
5231    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5232}
5233impl hash::Hash for ParenthesizedArgList {
5234    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5235}
5236impl Eq for ParenthesizedArgList {}
5237impl PartialEq for ParenthesizedArgList {
5238    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5239}
5240impl Clone for ParenthesizedArgList {
5241    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5242}
5243impl fmt::Debug for ParenthesizedArgList {
5244    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5245        f.debug_struct("ParenthesizedArgList").field("syntax", &self.syntax).finish()
5246    }
5247}
5248impl AstNode for Path {
5249    #[inline]
5250    fn kind() -> SyntaxKind
5251    where
5252        Self: Sized,
5253    {
5254        PATH
5255    }
5256    #[inline]
5257    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH }
5258    #[inline]
5259    fn cast(syntax: SyntaxNode) -> Option<Self> {
5260        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5261    }
5262    #[inline]
5263    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5264}
5265impl hash::Hash for Path {
5266    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5267}
5268impl Eq for Path {}
5269impl PartialEq for Path {
5270    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5271}
5272impl Clone for Path {
5273    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5274}
5275impl fmt::Debug for Path {
5276    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5277        f.debug_struct("Path").field("syntax", &self.syntax).finish()
5278    }
5279}
5280impl AstNode for PathExpr {
5281    #[inline]
5282    fn kind() -> SyntaxKind
5283    where
5284        Self: Sized,
5285    {
5286        PATH_EXPR
5287    }
5288    #[inline]
5289    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR }
5290    #[inline]
5291    fn cast(syntax: SyntaxNode) -> Option<Self> {
5292        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5293    }
5294    #[inline]
5295    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5296}
5297impl hash::Hash for PathExpr {
5298    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5299}
5300impl Eq for PathExpr {}
5301impl PartialEq for PathExpr {
5302    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5303}
5304impl Clone for PathExpr {
5305    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5306}
5307impl fmt::Debug for PathExpr {
5308    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5309        f.debug_struct("PathExpr").field("syntax", &self.syntax).finish()
5310    }
5311}
5312impl AstNode for PathPat {
5313    #[inline]
5314    fn kind() -> SyntaxKind
5315    where
5316        Self: Sized,
5317    {
5318        PATH_PAT
5319    }
5320    #[inline]
5321    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_PAT }
5322    #[inline]
5323    fn cast(syntax: SyntaxNode) -> Option<Self> {
5324        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5325    }
5326    #[inline]
5327    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5328}
5329impl hash::Hash for PathPat {
5330    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5331}
5332impl Eq for PathPat {}
5333impl PartialEq for PathPat {
5334    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5335}
5336impl Clone for PathPat {
5337    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5338}
5339impl fmt::Debug for PathPat {
5340    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5341        f.debug_struct("PathPat").field("syntax", &self.syntax).finish()
5342    }
5343}
5344impl AstNode for PathSegment {
5345    #[inline]
5346    fn kind() -> SyntaxKind
5347    where
5348        Self: Sized,
5349    {
5350        PATH_SEGMENT
5351    }
5352    #[inline]
5353    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT }
5354    #[inline]
5355    fn cast(syntax: SyntaxNode) -> Option<Self> {
5356        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5357    }
5358    #[inline]
5359    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5360}
5361impl hash::Hash for PathSegment {
5362    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5363}
5364impl Eq for PathSegment {}
5365impl PartialEq for PathSegment {
5366    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5367}
5368impl Clone for PathSegment {
5369    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5370}
5371impl fmt::Debug for PathSegment {
5372    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5373        f.debug_struct("PathSegment").field("syntax", &self.syntax).finish()
5374    }
5375}
5376impl AstNode for PathType {
5377    #[inline]
5378    fn kind() -> SyntaxKind
5379    where
5380        Self: Sized,
5381    {
5382        PATH_TYPE
5383    }
5384    #[inline]
5385    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE }
5386    #[inline]
5387    fn cast(syntax: SyntaxNode) -> Option<Self> {
5388        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5389    }
5390    #[inline]
5391    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5392}
5393impl hash::Hash for PathType {
5394    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5395}
5396impl Eq for PathType {}
5397impl PartialEq for PathType {
5398    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5399}
5400impl Clone for PathType {
5401    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5402}
5403impl fmt::Debug for PathType {
5404    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5405        f.debug_struct("PathType").field("syntax", &self.syntax).finish()
5406    }
5407}
5408impl AstNode for PrefixExpr {
5409    #[inline]
5410    fn kind() -> SyntaxKind
5411    where
5412        Self: Sized,
5413    {
5414        PREFIX_EXPR
5415    }
5416    #[inline]
5417    fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR }
5418    #[inline]
5419    fn cast(syntax: SyntaxNode) -> Option<Self> {
5420        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5421    }
5422    #[inline]
5423    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5424}
5425impl hash::Hash for PrefixExpr {
5426    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5427}
5428impl Eq for PrefixExpr {}
5429impl PartialEq for PrefixExpr {
5430    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5431}
5432impl Clone for PrefixExpr {
5433    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5434}
5435impl fmt::Debug for PrefixExpr {
5436    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5437        f.debug_struct("PrefixExpr").field("syntax", &self.syntax).finish()
5438    }
5439}
5440impl AstNode for PtrType {
5441    #[inline]
5442    fn kind() -> SyntaxKind
5443    where
5444        Self: Sized,
5445    {
5446        PTR_TYPE
5447    }
5448    #[inline]
5449    fn can_cast(kind: SyntaxKind) -> bool { kind == PTR_TYPE }
5450    #[inline]
5451    fn cast(syntax: SyntaxNode) -> Option<Self> {
5452        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5453    }
5454    #[inline]
5455    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5456}
5457impl hash::Hash for PtrType {
5458    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5459}
5460impl Eq for PtrType {}
5461impl PartialEq for PtrType {
5462    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5463}
5464impl Clone for PtrType {
5465    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5466}
5467impl fmt::Debug for PtrType {
5468    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5469        f.debug_struct("PtrType").field("syntax", &self.syntax).finish()
5470    }
5471}
5472impl AstNode for RangeExpr {
5473    #[inline]
5474    fn kind() -> SyntaxKind
5475    where
5476        Self: Sized,
5477    {
5478        RANGE_EXPR
5479    }
5480    #[inline]
5481    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR }
5482    #[inline]
5483    fn cast(syntax: SyntaxNode) -> Option<Self> {
5484        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5485    }
5486    #[inline]
5487    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5488}
5489impl hash::Hash for RangeExpr {
5490    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5491}
5492impl Eq for RangeExpr {}
5493impl PartialEq for RangeExpr {
5494    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5495}
5496impl Clone for RangeExpr {
5497    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5498}
5499impl fmt::Debug for RangeExpr {
5500    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5501        f.debug_struct("RangeExpr").field("syntax", &self.syntax).finish()
5502    }
5503}
5504impl AstNode for RangePat {
5505    #[inline]
5506    fn kind() -> SyntaxKind
5507    where
5508        Self: Sized,
5509    {
5510        RANGE_PAT
5511    }
5512    #[inline]
5513    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_PAT }
5514    #[inline]
5515    fn cast(syntax: SyntaxNode) -> Option<Self> {
5516        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5517    }
5518    #[inline]
5519    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5520}
5521impl hash::Hash for RangePat {
5522    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5523}
5524impl Eq for RangePat {}
5525impl PartialEq for RangePat {
5526    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5527}
5528impl Clone for RangePat {
5529    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5530}
5531impl fmt::Debug for RangePat {
5532    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5533        f.debug_struct("RangePat").field("syntax", &self.syntax).finish()
5534    }
5535}
5536impl AstNode for RecordExpr {
5537    #[inline]
5538    fn kind() -> SyntaxKind
5539    where
5540        Self: Sized,
5541    {
5542        RECORD_EXPR
5543    }
5544    #[inline]
5545    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR }
5546    #[inline]
5547    fn cast(syntax: SyntaxNode) -> Option<Self> {
5548        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5549    }
5550    #[inline]
5551    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5552}
5553impl hash::Hash for RecordExpr {
5554    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5555}
5556impl Eq for RecordExpr {}
5557impl PartialEq for RecordExpr {
5558    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5559}
5560impl Clone for RecordExpr {
5561    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5562}
5563impl fmt::Debug for RecordExpr {
5564    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5565        f.debug_struct("RecordExpr").field("syntax", &self.syntax).finish()
5566    }
5567}
5568impl AstNode for RecordExprField {
5569    #[inline]
5570    fn kind() -> SyntaxKind
5571    where
5572        Self: Sized,
5573    {
5574        RECORD_EXPR_FIELD
5575    }
5576    #[inline]
5577    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD }
5578    #[inline]
5579    fn cast(syntax: SyntaxNode) -> Option<Self> {
5580        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5581    }
5582    #[inline]
5583    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5584}
5585impl hash::Hash for RecordExprField {
5586    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5587}
5588impl Eq for RecordExprField {}
5589impl PartialEq for RecordExprField {
5590    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5591}
5592impl Clone for RecordExprField {
5593    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5594}
5595impl fmt::Debug for RecordExprField {
5596    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5597        f.debug_struct("RecordExprField").field("syntax", &self.syntax).finish()
5598    }
5599}
5600impl AstNode for RecordExprFieldList {
5601    #[inline]
5602    fn kind() -> SyntaxKind
5603    where
5604        Self: Sized,
5605    {
5606        RECORD_EXPR_FIELD_LIST
5607    }
5608    #[inline]
5609    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST }
5610    #[inline]
5611    fn cast(syntax: SyntaxNode) -> Option<Self> {
5612        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5613    }
5614    #[inline]
5615    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5616}
5617impl hash::Hash for RecordExprFieldList {
5618    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5619}
5620impl Eq for RecordExprFieldList {}
5621impl PartialEq for RecordExprFieldList {
5622    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5623}
5624impl Clone for RecordExprFieldList {
5625    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5626}
5627impl fmt::Debug for RecordExprFieldList {
5628    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5629        f.debug_struct("RecordExprFieldList").field("syntax", &self.syntax).finish()
5630    }
5631}
5632impl AstNode for RecordField {
5633    #[inline]
5634    fn kind() -> SyntaxKind
5635    where
5636        Self: Sized,
5637    {
5638        RECORD_FIELD
5639    }
5640    #[inline]
5641    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD }
5642    #[inline]
5643    fn cast(syntax: SyntaxNode) -> Option<Self> {
5644        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5645    }
5646    #[inline]
5647    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5648}
5649impl hash::Hash for RecordField {
5650    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5651}
5652impl Eq for RecordField {}
5653impl PartialEq for RecordField {
5654    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5655}
5656impl Clone for RecordField {
5657    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5658}
5659impl fmt::Debug for RecordField {
5660    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5661        f.debug_struct("RecordField").field("syntax", &self.syntax).finish()
5662    }
5663}
5664impl AstNode for RecordFieldList {
5665    #[inline]
5666    fn kind() -> SyntaxKind
5667    where
5668        Self: Sized,
5669    {
5670        RECORD_FIELD_LIST
5671    }
5672    #[inline]
5673    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST }
5674    #[inline]
5675    fn cast(syntax: SyntaxNode) -> Option<Self> {
5676        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5677    }
5678    #[inline]
5679    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5680}
5681impl hash::Hash for RecordFieldList {
5682    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5683}
5684impl Eq for RecordFieldList {}
5685impl PartialEq for RecordFieldList {
5686    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5687}
5688impl Clone for RecordFieldList {
5689    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5690}
5691impl fmt::Debug for RecordFieldList {
5692    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5693        f.debug_struct("RecordFieldList").field("syntax", &self.syntax).finish()
5694    }
5695}
5696impl AstNode for RecordPat {
5697    #[inline]
5698    fn kind() -> SyntaxKind
5699    where
5700        Self: Sized,
5701    {
5702        RECORD_PAT
5703    }
5704    #[inline]
5705    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT }
5706    #[inline]
5707    fn cast(syntax: SyntaxNode) -> Option<Self> {
5708        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5709    }
5710    #[inline]
5711    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5712}
5713impl hash::Hash for RecordPat {
5714    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5715}
5716impl Eq for RecordPat {}
5717impl PartialEq for RecordPat {
5718    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5719}
5720impl Clone for RecordPat {
5721    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5722}
5723impl fmt::Debug for RecordPat {
5724    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5725        f.debug_struct("RecordPat").field("syntax", &self.syntax).finish()
5726    }
5727}
5728impl AstNode for RecordPatField {
5729    #[inline]
5730    fn kind() -> SyntaxKind
5731    where
5732        Self: Sized,
5733    {
5734        RECORD_PAT_FIELD
5735    }
5736    #[inline]
5737    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT_FIELD }
5738    #[inline]
5739    fn cast(syntax: SyntaxNode) -> Option<Self> {
5740        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5741    }
5742    #[inline]
5743    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5744}
5745impl hash::Hash for RecordPatField {
5746    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5747}
5748impl Eq for RecordPatField {}
5749impl PartialEq for RecordPatField {
5750    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5751}
5752impl Clone for RecordPatField {
5753    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5754}
5755impl fmt::Debug for RecordPatField {
5756    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5757        f.debug_struct("RecordPatField").field("syntax", &self.syntax).finish()
5758    }
5759}
5760impl AstNode for RecordPatFieldList {
5761    #[inline]
5762    fn kind() -> SyntaxKind
5763    where
5764        Self: Sized,
5765    {
5766        RECORD_PAT_FIELD_LIST
5767    }
5768    #[inline]
5769    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT_FIELD_LIST }
5770    #[inline]
5771    fn cast(syntax: SyntaxNode) -> Option<Self> {
5772        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5773    }
5774    #[inline]
5775    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5776}
5777impl hash::Hash for RecordPatFieldList {
5778    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5779}
5780impl Eq for RecordPatFieldList {}
5781impl PartialEq for RecordPatFieldList {
5782    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5783}
5784impl Clone for RecordPatFieldList {
5785    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5786}
5787impl fmt::Debug for RecordPatFieldList {
5788    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5789        f.debug_struct("RecordPatFieldList").field("syntax", &self.syntax).finish()
5790    }
5791}
5792impl AstNode for RefExpr {
5793    #[inline]
5794    fn kind() -> SyntaxKind
5795    where
5796        Self: Sized,
5797    {
5798        REF_EXPR
5799    }
5800    #[inline]
5801    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR }
5802    #[inline]
5803    fn cast(syntax: SyntaxNode) -> Option<Self> {
5804        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5805    }
5806    #[inline]
5807    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5808}
5809impl hash::Hash for RefExpr {
5810    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5811}
5812impl Eq for RefExpr {}
5813impl PartialEq for RefExpr {
5814    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5815}
5816impl Clone for RefExpr {
5817    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5818}
5819impl fmt::Debug for RefExpr {
5820    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5821        f.debug_struct("RefExpr").field("syntax", &self.syntax).finish()
5822    }
5823}
5824impl AstNode for RefPat {
5825    #[inline]
5826    fn kind() -> SyntaxKind
5827    where
5828        Self: Sized,
5829    {
5830        REF_PAT
5831    }
5832    #[inline]
5833    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_PAT }
5834    #[inline]
5835    fn cast(syntax: SyntaxNode) -> Option<Self> {
5836        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5837    }
5838    #[inline]
5839    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5840}
5841impl hash::Hash for RefPat {
5842    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5843}
5844impl Eq for RefPat {}
5845impl PartialEq for RefPat {
5846    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5847}
5848impl Clone for RefPat {
5849    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5850}
5851impl fmt::Debug for RefPat {
5852    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5853        f.debug_struct("RefPat").field("syntax", &self.syntax).finish()
5854    }
5855}
5856impl AstNode for RefType {
5857    #[inline]
5858    fn kind() -> SyntaxKind
5859    where
5860        Self: Sized,
5861    {
5862        REF_TYPE
5863    }
5864    #[inline]
5865    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_TYPE }
5866    #[inline]
5867    fn cast(syntax: SyntaxNode) -> Option<Self> {
5868        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5869    }
5870    #[inline]
5871    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5872}
5873impl hash::Hash for RefType {
5874    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5875}
5876impl Eq for RefType {}
5877impl PartialEq for RefType {
5878    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5879}
5880impl Clone for RefType {
5881    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5882}
5883impl fmt::Debug for RefType {
5884    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5885        f.debug_struct("RefType").field("syntax", &self.syntax).finish()
5886    }
5887}
5888impl AstNode for Rename {
5889    #[inline]
5890    fn kind() -> SyntaxKind
5891    where
5892        Self: Sized,
5893    {
5894        RENAME
5895    }
5896    #[inline]
5897    fn can_cast(kind: SyntaxKind) -> bool { kind == RENAME }
5898    #[inline]
5899    fn cast(syntax: SyntaxNode) -> Option<Self> {
5900        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5901    }
5902    #[inline]
5903    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5904}
5905impl hash::Hash for Rename {
5906    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5907}
5908impl Eq for Rename {}
5909impl PartialEq for Rename {
5910    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5911}
5912impl Clone for Rename {
5913    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5914}
5915impl fmt::Debug for Rename {
5916    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5917        f.debug_struct("Rename").field("syntax", &self.syntax).finish()
5918    }
5919}
5920impl AstNode for RestPat {
5921    #[inline]
5922    fn kind() -> SyntaxKind
5923    where
5924        Self: Sized,
5925    {
5926        REST_PAT
5927    }
5928    #[inline]
5929    fn can_cast(kind: SyntaxKind) -> bool { kind == REST_PAT }
5930    #[inline]
5931    fn cast(syntax: SyntaxNode) -> Option<Self> {
5932        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5933    }
5934    #[inline]
5935    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5936}
5937impl hash::Hash for RestPat {
5938    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5939}
5940impl Eq for RestPat {}
5941impl PartialEq for RestPat {
5942    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5943}
5944impl Clone for RestPat {
5945    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5946}
5947impl fmt::Debug for RestPat {
5948    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5949        f.debug_struct("RestPat").field("syntax", &self.syntax).finish()
5950    }
5951}
5952impl AstNode for RetType {
5953    #[inline]
5954    fn kind() -> SyntaxKind
5955    where
5956        Self: Sized,
5957    {
5958        RET_TYPE
5959    }
5960    #[inline]
5961    fn can_cast(kind: SyntaxKind) -> bool { kind == RET_TYPE }
5962    #[inline]
5963    fn cast(syntax: SyntaxNode) -> Option<Self> {
5964        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5965    }
5966    #[inline]
5967    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5968}
5969impl hash::Hash for RetType {
5970    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5971}
5972impl Eq for RetType {}
5973impl PartialEq for RetType {
5974    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5975}
5976impl Clone for RetType {
5977    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5978}
5979impl fmt::Debug for RetType {
5980    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5981        f.debug_struct("RetType").field("syntax", &self.syntax).finish()
5982    }
5983}
5984impl AstNode for ReturnExpr {
5985    #[inline]
5986    fn kind() -> SyntaxKind
5987    where
5988        Self: Sized,
5989    {
5990        RETURN_EXPR
5991    }
5992    #[inline]
5993    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR }
5994    #[inline]
5995    fn cast(syntax: SyntaxNode) -> Option<Self> {
5996        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5997    }
5998    #[inline]
5999    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6000}
6001impl hash::Hash for ReturnExpr {
6002    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6003}
6004impl Eq for ReturnExpr {}
6005impl PartialEq for ReturnExpr {
6006    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6007}
6008impl Clone for ReturnExpr {
6009    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6010}
6011impl fmt::Debug for ReturnExpr {
6012    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6013        f.debug_struct("ReturnExpr").field("syntax", &self.syntax).finish()
6014    }
6015}
6016impl AstNode for ReturnTypeSyntax {
6017    #[inline]
6018    fn kind() -> SyntaxKind
6019    where
6020        Self: Sized,
6021    {
6022        RETURN_TYPE_SYNTAX
6023    }
6024    #[inline]
6025    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_TYPE_SYNTAX }
6026    #[inline]
6027    fn cast(syntax: SyntaxNode) -> Option<Self> {
6028        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6029    }
6030    #[inline]
6031    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6032}
6033impl hash::Hash for ReturnTypeSyntax {
6034    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6035}
6036impl Eq for ReturnTypeSyntax {}
6037impl PartialEq for ReturnTypeSyntax {
6038    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6039}
6040impl Clone for ReturnTypeSyntax {
6041    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6042}
6043impl fmt::Debug for ReturnTypeSyntax {
6044    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6045        f.debug_struct("ReturnTypeSyntax").field("syntax", &self.syntax).finish()
6046    }
6047}
6048impl AstNode for SelfParam {
6049    #[inline]
6050    fn kind() -> SyntaxKind
6051    where
6052        Self: Sized,
6053    {
6054        SELF_PARAM
6055    }
6056    #[inline]
6057    fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM }
6058    #[inline]
6059    fn cast(syntax: SyntaxNode) -> Option<Self> {
6060        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6061    }
6062    #[inline]
6063    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6064}
6065impl hash::Hash for SelfParam {
6066    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6067}
6068impl Eq for SelfParam {}
6069impl PartialEq for SelfParam {
6070    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6071}
6072impl Clone for SelfParam {
6073    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6074}
6075impl fmt::Debug for SelfParam {
6076    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6077        f.debug_struct("SelfParam").field("syntax", &self.syntax).finish()
6078    }
6079}
6080impl AstNode for SlicePat {
6081    #[inline]
6082    fn kind() -> SyntaxKind
6083    where
6084        Self: Sized,
6085    {
6086        SLICE_PAT
6087    }
6088    #[inline]
6089    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_PAT }
6090    #[inline]
6091    fn cast(syntax: SyntaxNode) -> Option<Self> {
6092        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6093    }
6094    #[inline]
6095    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6096}
6097impl hash::Hash for SlicePat {
6098    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6099}
6100impl Eq for SlicePat {}
6101impl PartialEq for SlicePat {
6102    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6103}
6104impl Clone for SlicePat {
6105    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6106}
6107impl fmt::Debug for SlicePat {
6108    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6109        f.debug_struct("SlicePat").field("syntax", &self.syntax).finish()
6110    }
6111}
6112impl AstNode for SliceType {
6113    #[inline]
6114    fn kind() -> SyntaxKind
6115    where
6116        Self: Sized,
6117    {
6118        SLICE_TYPE
6119    }
6120    #[inline]
6121    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE }
6122    #[inline]
6123    fn cast(syntax: SyntaxNode) -> Option<Self> {
6124        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6125    }
6126    #[inline]
6127    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6128}
6129impl hash::Hash for SliceType {
6130    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6131}
6132impl Eq for SliceType {}
6133impl PartialEq for SliceType {
6134    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6135}
6136impl Clone for SliceType {
6137    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6138}
6139impl fmt::Debug for SliceType {
6140    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6141        f.debug_struct("SliceType").field("syntax", &self.syntax).finish()
6142    }
6143}
6144impl AstNode for SourceFile {
6145    #[inline]
6146    fn kind() -> SyntaxKind
6147    where
6148        Self: Sized,
6149    {
6150        SOURCE_FILE
6151    }
6152    #[inline]
6153    fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE }
6154    #[inline]
6155    fn cast(syntax: SyntaxNode) -> Option<Self> {
6156        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6157    }
6158    #[inline]
6159    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6160}
6161impl hash::Hash for SourceFile {
6162    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6163}
6164impl Eq for SourceFile {}
6165impl PartialEq for SourceFile {
6166    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6167}
6168impl Clone for SourceFile {
6169    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6170}
6171impl fmt::Debug for SourceFile {
6172    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6173        f.debug_struct("SourceFile").field("syntax", &self.syntax).finish()
6174    }
6175}
6176impl AstNode for Static {
6177    #[inline]
6178    fn kind() -> SyntaxKind
6179    where
6180        Self: Sized,
6181    {
6182        STATIC
6183    }
6184    #[inline]
6185    fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC }
6186    #[inline]
6187    fn cast(syntax: SyntaxNode) -> Option<Self> {
6188        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6189    }
6190    #[inline]
6191    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6192}
6193impl hash::Hash for Static {
6194    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6195}
6196impl Eq for Static {}
6197impl PartialEq for Static {
6198    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6199}
6200impl Clone for Static {
6201    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6202}
6203impl fmt::Debug for Static {
6204    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6205        f.debug_struct("Static").field("syntax", &self.syntax).finish()
6206    }
6207}
6208impl AstNode for StmtList {
6209    #[inline]
6210    fn kind() -> SyntaxKind
6211    where
6212        Self: Sized,
6213    {
6214        STMT_LIST
6215    }
6216    #[inline]
6217    fn can_cast(kind: SyntaxKind) -> bool { kind == STMT_LIST }
6218    #[inline]
6219    fn cast(syntax: SyntaxNode) -> Option<Self> {
6220        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6221    }
6222    #[inline]
6223    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6224}
6225impl hash::Hash for StmtList {
6226    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6227}
6228impl Eq for StmtList {}
6229impl PartialEq for StmtList {
6230    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6231}
6232impl Clone for StmtList {
6233    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6234}
6235impl fmt::Debug for StmtList {
6236    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6237        f.debug_struct("StmtList").field("syntax", &self.syntax).finish()
6238    }
6239}
6240impl AstNode for Struct {
6241    #[inline]
6242    fn kind() -> SyntaxKind
6243    where
6244        Self: Sized,
6245    {
6246        STRUCT
6247    }
6248    #[inline]
6249    fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT }
6250    #[inline]
6251    fn cast(syntax: SyntaxNode) -> Option<Self> {
6252        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6253    }
6254    #[inline]
6255    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6256}
6257impl hash::Hash for Struct {
6258    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6259}
6260impl Eq for Struct {}
6261impl PartialEq for Struct {
6262    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6263}
6264impl Clone for Struct {
6265    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6266}
6267impl fmt::Debug for Struct {
6268    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6269        f.debug_struct("Struct").field("syntax", &self.syntax).finish()
6270    }
6271}
6272impl AstNode for TokenTree {
6273    #[inline]
6274    fn kind() -> SyntaxKind
6275    where
6276        Self: Sized,
6277    {
6278        TOKEN_TREE
6279    }
6280    #[inline]
6281    fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE }
6282    #[inline]
6283    fn cast(syntax: SyntaxNode) -> Option<Self> {
6284        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6285    }
6286    #[inline]
6287    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6288}
6289impl hash::Hash for TokenTree {
6290    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6291}
6292impl Eq for TokenTree {}
6293impl PartialEq for TokenTree {
6294    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6295}
6296impl Clone for TokenTree {
6297    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6298}
6299impl fmt::Debug for TokenTree {
6300    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6301        f.debug_struct("TokenTree").field("syntax", &self.syntax).finish()
6302    }
6303}
6304impl AstNode for Trait {
6305    #[inline]
6306    fn kind() -> SyntaxKind
6307    where
6308        Self: Sized,
6309    {
6310        TRAIT
6311    }
6312    #[inline]
6313    fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT }
6314    #[inline]
6315    fn cast(syntax: SyntaxNode) -> Option<Self> {
6316        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6317    }
6318    #[inline]
6319    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6320}
6321impl hash::Hash for Trait {
6322    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6323}
6324impl Eq for Trait {}
6325impl PartialEq for Trait {
6326    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6327}
6328impl Clone for Trait {
6329    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6330}
6331impl fmt::Debug for Trait {
6332    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6333        f.debug_struct("Trait").field("syntax", &self.syntax).finish()
6334    }
6335}
6336impl AstNode for TryBlockModifier {
6337    #[inline]
6338    fn kind() -> SyntaxKind
6339    where
6340        Self: Sized,
6341    {
6342        TRY_BLOCK_MODIFIER
6343    }
6344    #[inline]
6345    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_BLOCK_MODIFIER }
6346    #[inline]
6347    fn cast(syntax: SyntaxNode) -> Option<Self> {
6348        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6349    }
6350    #[inline]
6351    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6352}
6353impl hash::Hash for TryBlockModifier {
6354    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6355}
6356impl Eq for TryBlockModifier {}
6357impl PartialEq for TryBlockModifier {
6358    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6359}
6360impl Clone for TryBlockModifier {
6361    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6362}
6363impl fmt::Debug for TryBlockModifier {
6364    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6365        f.debug_struct("TryBlockModifier").field("syntax", &self.syntax).finish()
6366    }
6367}
6368impl AstNode for TryExpr {
6369    #[inline]
6370    fn kind() -> SyntaxKind
6371    where
6372        Self: Sized,
6373    {
6374        TRY_EXPR
6375    }
6376    #[inline]
6377    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR }
6378    #[inline]
6379    fn cast(syntax: SyntaxNode) -> Option<Self> {
6380        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6381    }
6382    #[inline]
6383    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6384}
6385impl hash::Hash for TryExpr {
6386    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6387}
6388impl Eq for TryExpr {}
6389impl PartialEq for TryExpr {
6390    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6391}
6392impl Clone for TryExpr {
6393    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6394}
6395impl fmt::Debug for TryExpr {
6396    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6397        f.debug_struct("TryExpr").field("syntax", &self.syntax).finish()
6398    }
6399}
6400impl AstNode for TupleExpr {
6401    #[inline]
6402    fn kind() -> SyntaxKind
6403    where
6404        Self: Sized,
6405    {
6406        TUPLE_EXPR
6407    }
6408    #[inline]
6409    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR }
6410    #[inline]
6411    fn cast(syntax: SyntaxNode) -> Option<Self> {
6412        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6413    }
6414    #[inline]
6415    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6416}
6417impl hash::Hash for TupleExpr {
6418    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6419}
6420impl Eq for TupleExpr {}
6421impl PartialEq for TupleExpr {
6422    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6423}
6424impl Clone for TupleExpr {
6425    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6426}
6427impl fmt::Debug for TupleExpr {
6428    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6429        f.debug_struct("TupleExpr").field("syntax", &self.syntax).finish()
6430    }
6431}
6432impl AstNode for TupleField {
6433    #[inline]
6434    fn kind() -> SyntaxKind
6435    where
6436        Self: Sized,
6437    {
6438        TUPLE_FIELD
6439    }
6440    #[inline]
6441    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD }
6442    #[inline]
6443    fn cast(syntax: SyntaxNode) -> Option<Self> {
6444        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6445    }
6446    #[inline]
6447    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6448}
6449impl hash::Hash for TupleField {
6450    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6451}
6452impl Eq for TupleField {}
6453impl PartialEq for TupleField {
6454    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6455}
6456impl Clone for TupleField {
6457    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6458}
6459impl fmt::Debug for TupleField {
6460    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6461        f.debug_struct("TupleField").field("syntax", &self.syntax).finish()
6462    }
6463}
6464impl AstNode for TupleFieldList {
6465    #[inline]
6466    fn kind() -> SyntaxKind
6467    where
6468        Self: Sized,
6469    {
6470        TUPLE_FIELD_LIST
6471    }
6472    #[inline]
6473    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_LIST }
6474    #[inline]
6475    fn cast(syntax: SyntaxNode) -> Option<Self> {
6476        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6477    }
6478    #[inline]
6479    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6480}
6481impl hash::Hash for TupleFieldList {
6482    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6483}
6484impl Eq for TupleFieldList {}
6485impl PartialEq for TupleFieldList {
6486    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6487}
6488impl Clone for TupleFieldList {
6489    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6490}
6491impl fmt::Debug for TupleFieldList {
6492    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6493        f.debug_struct("TupleFieldList").field("syntax", &self.syntax).finish()
6494    }
6495}
6496impl AstNode for TuplePat {
6497    #[inline]
6498    fn kind() -> SyntaxKind
6499    where
6500        Self: Sized,
6501    {
6502        TUPLE_PAT
6503    }
6504    #[inline]
6505    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_PAT }
6506    #[inline]
6507    fn cast(syntax: SyntaxNode) -> Option<Self> {
6508        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6509    }
6510    #[inline]
6511    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6512}
6513impl hash::Hash for TuplePat {
6514    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6515}
6516impl Eq for TuplePat {}
6517impl PartialEq for TuplePat {
6518    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6519}
6520impl Clone for TuplePat {
6521    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6522}
6523impl fmt::Debug for TuplePat {
6524    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6525        f.debug_struct("TuplePat").field("syntax", &self.syntax).finish()
6526    }
6527}
6528impl AstNode for TupleStructPat {
6529    #[inline]
6530    fn kind() -> SyntaxKind
6531    where
6532        Self: Sized,
6533    {
6534        TUPLE_STRUCT_PAT
6535    }
6536    #[inline]
6537    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_STRUCT_PAT }
6538    #[inline]
6539    fn cast(syntax: SyntaxNode) -> Option<Self> {
6540        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6541    }
6542    #[inline]
6543    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6544}
6545impl hash::Hash for TupleStructPat {
6546    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6547}
6548impl Eq for TupleStructPat {}
6549impl PartialEq for TupleStructPat {
6550    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6551}
6552impl Clone for TupleStructPat {
6553    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6554}
6555impl fmt::Debug for TupleStructPat {
6556    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6557        f.debug_struct("TupleStructPat").field("syntax", &self.syntax).finish()
6558    }
6559}
6560impl AstNode for TupleType {
6561    #[inline]
6562    fn kind() -> SyntaxKind
6563    where
6564        Self: Sized,
6565    {
6566        TUPLE_TYPE
6567    }
6568    #[inline]
6569    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE }
6570    #[inline]
6571    fn cast(syntax: SyntaxNode) -> Option<Self> {
6572        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6573    }
6574    #[inline]
6575    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6576}
6577impl hash::Hash for TupleType {
6578    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6579}
6580impl Eq for TupleType {}
6581impl PartialEq for TupleType {
6582    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6583}
6584impl Clone for TupleType {
6585    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6586}
6587impl fmt::Debug for TupleType {
6588    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6589        f.debug_struct("TupleType").field("syntax", &self.syntax).finish()
6590    }
6591}
6592impl AstNode for TypeAlias {
6593    #[inline]
6594    fn kind() -> SyntaxKind
6595    where
6596        Self: Sized,
6597    {
6598        TYPE_ALIAS
6599    }
6600    #[inline]
6601    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS }
6602    #[inline]
6603    fn cast(syntax: SyntaxNode) -> Option<Self> {
6604        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6605    }
6606    #[inline]
6607    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6608}
6609impl hash::Hash for TypeAlias {
6610    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6611}
6612impl Eq for TypeAlias {}
6613impl PartialEq for TypeAlias {
6614    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6615}
6616impl Clone for TypeAlias {
6617    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6618}
6619impl fmt::Debug for TypeAlias {
6620    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6621        f.debug_struct("TypeAlias").field("syntax", &self.syntax).finish()
6622    }
6623}
6624impl AstNode for TypeAnchor {
6625    #[inline]
6626    fn kind() -> SyntaxKind
6627    where
6628        Self: Sized,
6629    {
6630        TYPE_ANCHOR
6631    }
6632    #[inline]
6633    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ANCHOR }
6634    #[inline]
6635    fn cast(syntax: SyntaxNode) -> Option<Self> {
6636        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6637    }
6638    #[inline]
6639    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6640}
6641impl hash::Hash for TypeAnchor {
6642    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6643}
6644impl Eq for TypeAnchor {}
6645impl PartialEq for TypeAnchor {
6646    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6647}
6648impl Clone for TypeAnchor {
6649    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6650}
6651impl fmt::Debug for TypeAnchor {
6652    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6653        f.debug_struct("TypeAnchor").field("syntax", &self.syntax).finish()
6654    }
6655}
6656impl AstNode for TypeArg {
6657    #[inline]
6658    fn kind() -> SyntaxKind
6659    where
6660        Self: Sized,
6661    {
6662        TYPE_ARG
6663    }
6664    #[inline]
6665    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG }
6666    #[inline]
6667    fn cast(syntax: SyntaxNode) -> Option<Self> {
6668        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6669    }
6670    #[inline]
6671    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6672}
6673impl hash::Hash for TypeArg {
6674    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6675}
6676impl Eq for TypeArg {}
6677impl PartialEq for TypeArg {
6678    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6679}
6680impl Clone for TypeArg {
6681    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6682}
6683impl fmt::Debug for TypeArg {
6684    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6685        f.debug_struct("TypeArg").field("syntax", &self.syntax).finish()
6686    }
6687}
6688impl AstNode for TypeBound {
6689    #[inline]
6690    fn kind() -> SyntaxKind
6691    where
6692        Self: Sized,
6693    {
6694        TYPE_BOUND
6695    }
6696    #[inline]
6697    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND }
6698    #[inline]
6699    fn cast(syntax: SyntaxNode) -> Option<Self> {
6700        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6701    }
6702    #[inline]
6703    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6704}
6705impl hash::Hash for TypeBound {
6706    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6707}
6708impl Eq for TypeBound {}
6709impl PartialEq for TypeBound {
6710    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6711}
6712impl Clone for TypeBound {
6713    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6714}
6715impl fmt::Debug for TypeBound {
6716    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6717        f.debug_struct("TypeBound").field("syntax", &self.syntax).finish()
6718    }
6719}
6720impl AstNode for TypeBoundList {
6721    #[inline]
6722    fn kind() -> SyntaxKind
6723    where
6724        Self: Sized,
6725    {
6726        TYPE_BOUND_LIST
6727    }
6728    #[inline]
6729    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
6730    #[inline]
6731    fn cast(syntax: SyntaxNode) -> Option<Self> {
6732        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6733    }
6734    #[inline]
6735    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6736}
6737impl hash::Hash for TypeBoundList {
6738    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6739}
6740impl Eq for TypeBoundList {}
6741impl PartialEq for TypeBoundList {
6742    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6743}
6744impl Clone for TypeBoundList {
6745    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6746}
6747impl fmt::Debug for TypeBoundList {
6748    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6749        f.debug_struct("TypeBoundList").field("syntax", &self.syntax).finish()
6750    }
6751}
6752impl AstNode for TypeParam {
6753    #[inline]
6754    fn kind() -> SyntaxKind
6755    where
6756        Self: Sized,
6757    {
6758        TYPE_PARAM
6759    }
6760    #[inline]
6761    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM }
6762    #[inline]
6763    fn cast(syntax: SyntaxNode) -> Option<Self> {
6764        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6765    }
6766    #[inline]
6767    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6768}
6769impl hash::Hash for TypeParam {
6770    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6771}
6772impl Eq for TypeParam {}
6773impl PartialEq for TypeParam {
6774    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6775}
6776impl Clone for TypeParam {
6777    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6778}
6779impl fmt::Debug for TypeParam {
6780    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6781        f.debug_struct("TypeParam").field("syntax", &self.syntax).finish()
6782    }
6783}
6784impl AstNode for UnderscoreExpr {
6785    #[inline]
6786    fn kind() -> SyntaxKind
6787    where
6788        Self: Sized,
6789    {
6790        UNDERSCORE_EXPR
6791    }
6792    #[inline]
6793    fn can_cast(kind: SyntaxKind) -> bool { kind == UNDERSCORE_EXPR }
6794    #[inline]
6795    fn cast(syntax: SyntaxNode) -> Option<Self> {
6796        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6797    }
6798    #[inline]
6799    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6800}
6801impl hash::Hash for UnderscoreExpr {
6802    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6803}
6804impl Eq for UnderscoreExpr {}
6805impl PartialEq for UnderscoreExpr {
6806    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6807}
6808impl Clone for UnderscoreExpr {
6809    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6810}
6811impl fmt::Debug for UnderscoreExpr {
6812    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6813        f.debug_struct("UnderscoreExpr").field("syntax", &self.syntax).finish()
6814    }
6815}
6816impl AstNode for Union {
6817    #[inline]
6818    fn kind() -> SyntaxKind
6819    where
6820        Self: Sized,
6821    {
6822        UNION
6823    }
6824    #[inline]
6825    fn can_cast(kind: SyntaxKind) -> bool { kind == UNION }
6826    #[inline]
6827    fn cast(syntax: SyntaxNode) -> Option<Self> {
6828        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6829    }
6830    #[inline]
6831    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6832}
6833impl hash::Hash for Union {
6834    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6835}
6836impl Eq for Union {}
6837impl PartialEq for Union {
6838    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6839}
6840impl Clone for Union {
6841    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6842}
6843impl fmt::Debug for Union {
6844    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6845        f.debug_struct("Union").field("syntax", &self.syntax).finish()
6846    }
6847}
6848impl AstNode for Use {
6849    #[inline]
6850    fn kind() -> SyntaxKind
6851    where
6852        Self: Sized,
6853    {
6854        USE
6855    }
6856    #[inline]
6857    fn can_cast(kind: SyntaxKind) -> bool { kind == USE }
6858    #[inline]
6859    fn cast(syntax: SyntaxNode) -> Option<Self> {
6860        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6861    }
6862    #[inline]
6863    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6864}
6865impl hash::Hash for Use {
6866    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6867}
6868impl Eq for Use {}
6869impl PartialEq for Use {
6870    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6871}
6872impl Clone for Use {
6873    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6874}
6875impl fmt::Debug for Use {
6876    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6877        f.debug_struct("Use").field("syntax", &self.syntax).finish()
6878    }
6879}
6880impl AstNode for UseBoundGenericArgs {
6881    #[inline]
6882    fn kind() -> SyntaxKind
6883    where
6884        Self: Sized,
6885    {
6886        USE_BOUND_GENERIC_ARGS
6887    }
6888    #[inline]
6889    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_BOUND_GENERIC_ARGS }
6890    #[inline]
6891    fn cast(syntax: SyntaxNode) -> Option<Self> {
6892        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6893    }
6894    #[inline]
6895    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6896}
6897impl hash::Hash for UseBoundGenericArgs {
6898    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6899}
6900impl Eq for UseBoundGenericArgs {}
6901impl PartialEq for UseBoundGenericArgs {
6902    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6903}
6904impl Clone for UseBoundGenericArgs {
6905    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6906}
6907impl fmt::Debug for UseBoundGenericArgs {
6908    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6909        f.debug_struct("UseBoundGenericArgs").field("syntax", &self.syntax).finish()
6910    }
6911}
6912impl AstNode for UseTree {
6913    #[inline]
6914    fn kind() -> SyntaxKind
6915    where
6916        Self: Sized,
6917    {
6918        USE_TREE
6919    }
6920    #[inline]
6921    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE }
6922    #[inline]
6923    fn cast(syntax: SyntaxNode) -> Option<Self> {
6924        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6925    }
6926    #[inline]
6927    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6928}
6929impl hash::Hash for UseTree {
6930    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6931}
6932impl Eq for UseTree {}
6933impl PartialEq for UseTree {
6934    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6935}
6936impl Clone for UseTree {
6937    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6938}
6939impl fmt::Debug for UseTree {
6940    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6941        f.debug_struct("UseTree").field("syntax", &self.syntax).finish()
6942    }
6943}
6944impl AstNode for UseTreeList {
6945    #[inline]
6946    fn kind() -> SyntaxKind
6947    where
6948        Self: Sized,
6949    {
6950        USE_TREE_LIST
6951    }
6952    #[inline]
6953    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE_LIST }
6954    #[inline]
6955    fn cast(syntax: SyntaxNode) -> Option<Self> {
6956        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6957    }
6958    #[inline]
6959    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6960}
6961impl hash::Hash for UseTreeList {
6962    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6963}
6964impl Eq for UseTreeList {}
6965impl PartialEq for UseTreeList {
6966    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6967}
6968impl Clone for UseTreeList {
6969    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6970}
6971impl fmt::Debug for UseTreeList {
6972    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6973        f.debug_struct("UseTreeList").field("syntax", &self.syntax).finish()
6974    }
6975}
6976impl AstNode for Variant {
6977    #[inline]
6978    fn kind() -> SyntaxKind
6979    where
6980        Self: Sized,
6981    {
6982        VARIANT
6983    }
6984    #[inline]
6985    fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT }
6986    #[inline]
6987    fn cast(syntax: SyntaxNode) -> Option<Self> {
6988        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6989    }
6990    #[inline]
6991    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6992}
6993impl hash::Hash for Variant {
6994    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6995}
6996impl Eq for Variant {}
6997impl PartialEq for Variant {
6998    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6999}
7000impl Clone for Variant {
7001    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7002}
7003impl fmt::Debug for Variant {
7004    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7005        f.debug_struct("Variant").field("syntax", &self.syntax).finish()
7006    }
7007}
7008impl AstNode for VariantList {
7009    #[inline]
7010    fn kind() -> SyntaxKind
7011    where
7012        Self: Sized,
7013    {
7014        VARIANT_LIST
7015    }
7016    #[inline]
7017    fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT_LIST }
7018    #[inline]
7019    fn cast(syntax: SyntaxNode) -> Option<Self> {
7020        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7021    }
7022    #[inline]
7023    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7024}
7025impl hash::Hash for VariantList {
7026    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7027}
7028impl Eq for VariantList {}
7029impl PartialEq for VariantList {
7030    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7031}
7032impl Clone for VariantList {
7033    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7034}
7035impl fmt::Debug for VariantList {
7036    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7037        f.debug_struct("VariantList").field("syntax", &self.syntax).finish()
7038    }
7039}
7040impl AstNode for Visibility {
7041    #[inline]
7042    fn kind() -> SyntaxKind
7043    where
7044        Self: Sized,
7045    {
7046        VISIBILITY
7047    }
7048    #[inline]
7049    fn can_cast(kind: SyntaxKind) -> bool { kind == VISIBILITY }
7050    #[inline]
7051    fn cast(syntax: SyntaxNode) -> Option<Self> {
7052        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7053    }
7054    #[inline]
7055    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7056}
7057impl hash::Hash for Visibility {
7058    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7059}
7060impl Eq for Visibility {}
7061impl PartialEq for Visibility {
7062    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7063}
7064impl Clone for Visibility {
7065    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7066}
7067impl fmt::Debug for Visibility {
7068    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7069        f.debug_struct("Visibility").field("syntax", &self.syntax).finish()
7070    }
7071}
7072impl AstNode for WhereClause {
7073    #[inline]
7074    fn kind() -> SyntaxKind
7075    where
7076        Self: Sized,
7077    {
7078        WHERE_CLAUSE
7079    }
7080    #[inline]
7081    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_CLAUSE }
7082    #[inline]
7083    fn cast(syntax: SyntaxNode) -> Option<Self> {
7084        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7085    }
7086    #[inline]
7087    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7088}
7089impl hash::Hash for WhereClause {
7090    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7091}
7092impl Eq for WhereClause {}
7093impl PartialEq for WhereClause {
7094    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7095}
7096impl Clone for WhereClause {
7097    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7098}
7099impl fmt::Debug for WhereClause {
7100    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7101        f.debug_struct("WhereClause").field("syntax", &self.syntax).finish()
7102    }
7103}
7104impl AstNode for WherePred {
7105    #[inline]
7106    fn kind() -> SyntaxKind
7107    where
7108        Self: Sized,
7109    {
7110        WHERE_PRED
7111    }
7112    #[inline]
7113    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED }
7114    #[inline]
7115    fn cast(syntax: SyntaxNode) -> Option<Self> {
7116        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7117    }
7118    #[inline]
7119    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7120}
7121impl hash::Hash for WherePred {
7122    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7123}
7124impl Eq for WherePred {}
7125impl PartialEq for WherePred {
7126    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7127}
7128impl Clone for WherePred {
7129    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7130}
7131impl fmt::Debug for WherePred {
7132    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7133        f.debug_struct("WherePred").field("syntax", &self.syntax).finish()
7134    }
7135}
7136impl AstNode for WhileExpr {
7137    #[inline]
7138    fn kind() -> SyntaxKind
7139    where
7140        Self: Sized,
7141    {
7142        WHILE_EXPR
7143    }
7144    #[inline]
7145    fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR }
7146    #[inline]
7147    fn cast(syntax: SyntaxNode) -> Option<Self> {
7148        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7149    }
7150    #[inline]
7151    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7152}
7153impl hash::Hash for WhileExpr {
7154    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7155}
7156impl Eq for WhileExpr {}
7157impl PartialEq for WhileExpr {
7158    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7159}
7160impl Clone for WhileExpr {
7161    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7162}
7163impl fmt::Debug for WhileExpr {
7164    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7165        f.debug_struct("WhileExpr").field("syntax", &self.syntax).finish()
7166    }
7167}
7168impl AstNode for WildcardPat {
7169    #[inline]
7170    fn kind() -> SyntaxKind
7171    where
7172        Self: Sized,
7173    {
7174        WILDCARD_PAT
7175    }
7176    #[inline]
7177    fn can_cast(kind: SyntaxKind) -> bool { kind == WILDCARD_PAT }
7178    #[inline]
7179    fn cast(syntax: SyntaxNode) -> Option<Self> {
7180        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7181    }
7182    #[inline]
7183    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7184}
7185impl hash::Hash for WildcardPat {
7186    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7187}
7188impl Eq for WildcardPat {}
7189impl PartialEq for WildcardPat {
7190    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7191}
7192impl Clone for WildcardPat {
7193    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7194}
7195impl fmt::Debug for WildcardPat {
7196    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7197        f.debug_struct("WildcardPat").field("syntax", &self.syntax).finish()
7198    }
7199}
7200impl AstNode for YeetExpr {
7201    #[inline]
7202    fn kind() -> SyntaxKind
7203    where
7204        Self: Sized,
7205    {
7206        YEET_EXPR
7207    }
7208    #[inline]
7209    fn can_cast(kind: SyntaxKind) -> bool { kind == YEET_EXPR }
7210    #[inline]
7211    fn cast(syntax: SyntaxNode) -> Option<Self> {
7212        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7213    }
7214    #[inline]
7215    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7216}
7217impl hash::Hash for YeetExpr {
7218    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7219}
7220impl Eq for YeetExpr {}
7221impl PartialEq for YeetExpr {
7222    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7223}
7224impl Clone for YeetExpr {
7225    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7226}
7227impl fmt::Debug for YeetExpr {
7228    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7229        f.debug_struct("YeetExpr").field("syntax", &self.syntax).finish()
7230    }
7231}
7232impl AstNode for YieldExpr {
7233    #[inline]
7234    fn kind() -> SyntaxKind
7235    where
7236        Self: Sized,
7237    {
7238        YIELD_EXPR
7239    }
7240    #[inline]
7241    fn can_cast(kind: SyntaxKind) -> bool { kind == YIELD_EXPR }
7242    #[inline]
7243    fn cast(syntax: SyntaxNode) -> Option<Self> {
7244        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7245    }
7246    #[inline]
7247    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7248}
7249impl hash::Hash for YieldExpr {
7250    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7251}
7252impl Eq for YieldExpr {}
7253impl PartialEq for YieldExpr {
7254    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7255}
7256impl Clone for YieldExpr {
7257    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7258}
7259impl fmt::Debug for YieldExpr {
7260    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7261        f.debug_struct("YieldExpr").field("syntax", &self.syntax).finish()
7262    }
7263}
7264impl From<Enum> for Adt {
7265    #[inline]
7266    fn from(node: Enum) -> Adt { Adt::Enum(node) }
7267}
7268impl From<Struct> for Adt {
7269    #[inline]
7270    fn from(node: Struct) -> Adt { Adt::Struct(node) }
7271}
7272impl From<Union> for Adt {
7273    #[inline]
7274    fn from(node: Union) -> Adt { Adt::Union(node) }
7275}
7276impl AstNode for Adt {
7277    #[inline]
7278    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ENUM | STRUCT | UNION) }
7279    #[inline]
7280    fn cast(syntax: SyntaxNode) -> Option<Self> {
7281        let res = match syntax.kind() {
7282            ENUM => Adt::Enum(Enum { syntax }),
7283            STRUCT => Adt::Struct(Struct { syntax }),
7284            UNION => Adt::Union(Union { syntax }),
7285            _ => return None,
7286        };
7287        Some(res)
7288    }
7289    #[inline]
7290    fn syntax(&self) -> &SyntaxNode {
7291        match self {
7292            Adt::Enum(it) => &it.syntax,
7293            Adt::Struct(it) => &it.syntax,
7294            Adt::Union(it) => &it.syntax,
7295        }
7296    }
7297}
7298impl From<AsmConst> for AsmOperand {
7299    #[inline]
7300    fn from(node: AsmConst) -> AsmOperand { AsmOperand::AsmConst(node) }
7301}
7302impl From<AsmLabel> for AsmOperand {
7303    #[inline]
7304    fn from(node: AsmLabel) -> AsmOperand { AsmOperand::AsmLabel(node) }
7305}
7306impl From<AsmRegOperand> for AsmOperand {
7307    #[inline]
7308    fn from(node: AsmRegOperand) -> AsmOperand { AsmOperand::AsmRegOperand(node) }
7309}
7310impl From<AsmSym> for AsmOperand {
7311    #[inline]
7312    fn from(node: AsmSym) -> AsmOperand { AsmOperand::AsmSym(node) }
7313}
7314impl AstNode for AsmOperand {
7315    #[inline]
7316    fn can_cast(kind: SyntaxKind) -> bool {
7317        matches!(kind, ASM_CONST | ASM_LABEL | ASM_REG_OPERAND | ASM_SYM)
7318    }
7319    #[inline]
7320    fn cast(syntax: SyntaxNode) -> Option<Self> {
7321        let res = match syntax.kind() {
7322            ASM_CONST => AsmOperand::AsmConst(AsmConst { syntax }),
7323            ASM_LABEL => AsmOperand::AsmLabel(AsmLabel { syntax }),
7324            ASM_REG_OPERAND => AsmOperand::AsmRegOperand(AsmRegOperand { syntax }),
7325            ASM_SYM => AsmOperand::AsmSym(AsmSym { syntax }),
7326            _ => return None,
7327        };
7328        Some(res)
7329    }
7330    #[inline]
7331    fn syntax(&self) -> &SyntaxNode {
7332        match self {
7333            AsmOperand::AsmConst(it) => &it.syntax,
7334            AsmOperand::AsmLabel(it) => &it.syntax,
7335            AsmOperand::AsmRegOperand(it) => &it.syntax,
7336            AsmOperand::AsmSym(it) => &it.syntax,
7337        }
7338    }
7339}
7340impl From<AsmClobberAbi> for AsmPiece {
7341    #[inline]
7342    fn from(node: AsmClobberAbi) -> AsmPiece { AsmPiece::AsmClobberAbi(node) }
7343}
7344impl From<AsmOperandNamed> for AsmPiece {
7345    #[inline]
7346    fn from(node: AsmOperandNamed) -> AsmPiece { AsmPiece::AsmOperandNamed(node) }
7347}
7348impl From<AsmOptions> for AsmPiece {
7349    #[inline]
7350    fn from(node: AsmOptions) -> AsmPiece { AsmPiece::AsmOptions(node) }
7351}
7352impl AstNode for AsmPiece {
7353    #[inline]
7354    fn can_cast(kind: SyntaxKind) -> bool {
7355        matches!(kind, ASM_CLOBBER_ABI | ASM_OPERAND_NAMED | ASM_OPTIONS)
7356    }
7357    #[inline]
7358    fn cast(syntax: SyntaxNode) -> Option<Self> {
7359        let res = match syntax.kind() {
7360            ASM_CLOBBER_ABI => AsmPiece::AsmClobberAbi(AsmClobberAbi { syntax }),
7361            ASM_OPERAND_NAMED => AsmPiece::AsmOperandNamed(AsmOperandNamed { syntax }),
7362            ASM_OPTIONS => AsmPiece::AsmOptions(AsmOptions { syntax }),
7363            _ => return None,
7364        };
7365        Some(res)
7366    }
7367    #[inline]
7368    fn syntax(&self) -> &SyntaxNode {
7369        match self {
7370            AsmPiece::AsmClobberAbi(it) => &it.syntax,
7371            AsmPiece::AsmOperandNamed(it) => &it.syntax,
7372            AsmPiece::AsmOptions(it) => &it.syntax,
7373        }
7374    }
7375}
7376impl From<Const> for AssocItem {
7377    #[inline]
7378    fn from(node: Const) -> AssocItem { AssocItem::Const(node) }
7379}
7380impl From<Fn> for AssocItem {
7381    #[inline]
7382    fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
7383}
7384impl From<MacroCall> for AssocItem {
7385    #[inline]
7386    fn from(node: MacroCall) -> AssocItem { AssocItem::MacroCall(node) }
7387}
7388impl From<TypeAlias> for AssocItem {
7389    #[inline]
7390    fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) }
7391}
7392impl AstNode for AssocItem {
7393    #[inline]
7394    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CONST | FN | MACRO_CALL | TYPE_ALIAS) }
7395    #[inline]
7396    fn cast(syntax: SyntaxNode) -> Option<Self> {
7397        let res = match syntax.kind() {
7398            CONST => AssocItem::Const(Const { syntax }),
7399            FN => AssocItem::Fn(Fn { syntax }),
7400            MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
7401            TYPE_ALIAS => AssocItem::TypeAlias(TypeAlias { syntax }),
7402            _ => return None,
7403        };
7404        Some(res)
7405    }
7406    #[inline]
7407    fn syntax(&self) -> &SyntaxNode {
7408        match self {
7409            AssocItem::Const(it) => &it.syntax,
7410            AssocItem::Fn(it) => &it.syntax,
7411            AssocItem::MacroCall(it) => &it.syntax,
7412            AssocItem::TypeAlias(it) => &it.syntax,
7413        }
7414    }
7415}
7416impl From<ArrayExpr> for Expr {
7417    #[inline]
7418    fn from(node: ArrayExpr) -> Expr { Expr::ArrayExpr(node) }
7419}
7420impl From<AsmExpr> for Expr {
7421    #[inline]
7422    fn from(node: AsmExpr) -> Expr { Expr::AsmExpr(node) }
7423}
7424impl From<AwaitExpr> for Expr {
7425    #[inline]
7426    fn from(node: AwaitExpr) -> Expr { Expr::AwaitExpr(node) }
7427}
7428impl From<BecomeExpr> for Expr {
7429    #[inline]
7430    fn from(node: BecomeExpr) -> Expr { Expr::BecomeExpr(node) }
7431}
7432impl From<BinExpr> for Expr {
7433    #[inline]
7434    fn from(node: BinExpr) -> Expr { Expr::BinExpr(node) }
7435}
7436impl From<BlockExpr> for Expr {
7437    #[inline]
7438    fn from(node: BlockExpr) -> Expr { Expr::BlockExpr(node) }
7439}
7440impl From<BreakExpr> for Expr {
7441    #[inline]
7442    fn from(node: BreakExpr) -> Expr { Expr::BreakExpr(node) }
7443}
7444impl From<CallExpr> for Expr {
7445    #[inline]
7446    fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
7447}
7448impl From<CastExpr> for Expr {
7449    #[inline]
7450    fn from(node: CastExpr) -> Expr { Expr::CastExpr(node) }
7451}
7452impl From<ClosureExpr> for Expr {
7453    #[inline]
7454    fn from(node: ClosureExpr) -> Expr { Expr::ClosureExpr(node) }
7455}
7456impl From<ContinueExpr> for Expr {
7457    #[inline]
7458    fn from(node: ContinueExpr) -> Expr { Expr::ContinueExpr(node) }
7459}
7460impl From<FieldExpr> for Expr {
7461    #[inline]
7462    fn from(node: FieldExpr) -> Expr { Expr::FieldExpr(node) }
7463}
7464impl From<ForExpr> for Expr {
7465    #[inline]
7466    fn from(node: ForExpr) -> Expr { Expr::ForExpr(node) }
7467}
7468impl From<FormatArgsExpr> for Expr {
7469    #[inline]
7470    fn from(node: FormatArgsExpr) -> Expr { Expr::FormatArgsExpr(node) }
7471}
7472impl From<IfExpr> for Expr {
7473    #[inline]
7474    fn from(node: IfExpr) -> Expr { Expr::IfExpr(node) }
7475}
7476impl From<IndexExpr> for Expr {
7477    #[inline]
7478    fn from(node: IndexExpr) -> Expr { Expr::IndexExpr(node) }
7479}
7480impl From<LetExpr> for Expr {
7481    #[inline]
7482    fn from(node: LetExpr) -> Expr { Expr::LetExpr(node) }
7483}
7484impl From<Literal> for Expr {
7485    #[inline]
7486    fn from(node: Literal) -> Expr { Expr::Literal(node) }
7487}
7488impl From<LoopExpr> for Expr {
7489    #[inline]
7490    fn from(node: LoopExpr) -> Expr { Expr::LoopExpr(node) }
7491}
7492impl From<MacroExpr> for Expr {
7493    #[inline]
7494    fn from(node: MacroExpr) -> Expr { Expr::MacroExpr(node) }
7495}
7496impl From<MatchExpr> for Expr {
7497    #[inline]
7498    fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) }
7499}
7500impl From<MethodCallExpr> for Expr {
7501    #[inline]
7502    fn from(node: MethodCallExpr) -> Expr { Expr::MethodCallExpr(node) }
7503}
7504impl From<OffsetOfExpr> for Expr {
7505    #[inline]
7506    fn from(node: OffsetOfExpr) -> Expr { Expr::OffsetOfExpr(node) }
7507}
7508impl From<ParenExpr> for Expr {
7509    #[inline]
7510    fn from(node: ParenExpr) -> Expr { Expr::ParenExpr(node) }
7511}
7512impl From<PathExpr> for Expr {
7513    #[inline]
7514    fn from(node: PathExpr) -> Expr { Expr::PathExpr(node) }
7515}
7516impl From<PrefixExpr> for Expr {
7517    #[inline]
7518    fn from(node: PrefixExpr) -> Expr { Expr::PrefixExpr(node) }
7519}
7520impl From<RangeExpr> for Expr {
7521    #[inline]
7522    fn from(node: RangeExpr) -> Expr { Expr::RangeExpr(node) }
7523}
7524impl From<RecordExpr> for Expr {
7525    #[inline]
7526    fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) }
7527}
7528impl From<RefExpr> for Expr {
7529    #[inline]
7530    fn from(node: RefExpr) -> Expr { Expr::RefExpr(node) }
7531}
7532impl From<ReturnExpr> for Expr {
7533    #[inline]
7534    fn from(node: ReturnExpr) -> Expr { Expr::ReturnExpr(node) }
7535}
7536impl From<TryExpr> for Expr {
7537    #[inline]
7538    fn from(node: TryExpr) -> Expr { Expr::TryExpr(node) }
7539}
7540impl From<TupleExpr> for Expr {
7541    #[inline]
7542    fn from(node: TupleExpr) -> Expr { Expr::TupleExpr(node) }
7543}
7544impl From<UnderscoreExpr> for Expr {
7545    #[inline]
7546    fn from(node: UnderscoreExpr) -> Expr { Expr::UnderscoreExpr(node) }
7547}
7548impl From<WhileExpr> for Expr {
7549    #[inline]
7550    fn from(node: WhileExpr) -> Expr { Expr::WhileExpr(node) }
7551}
7552impl From<YeetExpr> for Expr {
7553    #[inline]
7554    fn from(node: YeetExpr) -> Expr { Expr::YeetExpr(node) }
7555}
7556impl From<YieldExpr> for Expr {
7557    #[inline]
7558    fn from(node: YieldExpr) -> Expr { Expr::YieldExpr(node) }
7559}
7560impl AstNode for Expr {
7561    #[inline]
7562    fn can_cast(kind: SyntaxKind) -> bool {
7563        matches!(
7564            kind,
7565            ARRAY_EXPR
7566                | ASM_EXPR
7567                | AWAIT_EXPR
7568                | BECOME_EXPR
7569                | BIN_EXPR
7570                | BLOCK_EXPR
7571                | BREAK_EXPR
7572                | CALL_EXPR
7573                | CAST_EXPR
7574                | CLOSURE_EXPR
7575                | CONTINUE_EXPR
7576                | FIELD_EXPR
7577                | FOR_EXPR
7578                | FORMAT_ARGS_EXPR
7579                | IF_EXPR
7580                | INDEX_EXPR
7581                | LET_EXPR
7582                | LITERAL
7583                | LOOP_EXPR
7584                | MACRO_EXPR
7585                | MATCH_EXPR
7586                | METHOD_CALL_EXPR
7587                | OFFSET_OF_EXPR
7588                | PAREN_EXPR
7589                | PATH_EXPR
7590                | PREFIX_EXPR
7591                | RANGE_EXPR
7592                | RECORD_EXPR
7593                | REF_EXPR
7594                | RETURN_EXPR
7595                | TRY_EXPR
7596                | TUPLE_EXPR
7597                | UNDERSCORE_EXPR
7598                | WHILE_EXPR
7599                | YEET_EXPR
7600                | YIELD_EXPR
7601        )
7602    }
7603    #[inline]
7604    fn cast(syntax: SyntaxNode) -> Option<Self> {
7605        let res = match syntax.kind() {
7606            ARRAY_EXPR => Expr::ArrayExpr(ArrayExpr { syntax }),
7607            ASM_EXPR => Expr::AsmExpr(AsmExpr { syntax }),
7608            AWAIT_EXPR => Expr::AwaitExpr(AwaitExpr { syntax }),
7609            BECOME_EXPR => Expr::BecomeExpr(BecomeExpr { syntax }),
7610            BIN_EXPR => Expr::BinExpr(BinExpr { syntax }),
7611            BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
7612            BREAK_EXPR => Expr::BreakExpr(BreakExpr { syntax }),
7613            CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
7614            CAST_EXPR => Expr::CastExpr(CastExpr { syntax }),
7615            CLOSURE_EXPR => Expr::ClosureExpr(ClosureExpr { syntax }),
7616            CONTINUE_EXPR => Expr::ContinueExpr(ContinueExpr { syntax }),
7617            FIELD_EXPR => Expr::FieldExpr(FieldExpr { syntax }),
7618            FOR_EXPR => Expr::ForExpr(ForExpr { syntax }),
7619            FORMAT_ARGS_EXPR => Expr::FormatArgsExpr(FormatArgsExpr { syntax }),
7620            IF_EXPR => Expr::IfExpr(IfExpr { syntax }),
7621            INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
7622            LET_EXPR => Expr::LetExpr(LetExpr { syntax }),
7623            LITERAL => Expr::Literal(Literal { syntax }),
7624            LOOP_EXPR => Expr::LoopExpr(LoopExpr { syntax }),
7625            MACRO_EXPR => Expr::MacroExpr(MacroExpr { syntax }),
7626            MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }),
7627            METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }),
7628            OFFSET_OF_EXPR => Expr::OffsetOfExpr(OffsetOfExpr { syntax }),
7629            PAREN_EXPR => Expr::ParenExpr(ParenExpr { syntax }),
7630            PATH_EXPR => Expr::PathExpr(PathExpr { syntax }),
7631            PREFIX_EXPR => Expr::PrefixExpr(PrefixExpr { syntax }),
7632            RANGE_EXPR => Expr::RangeExpr(RangeExpr { syntax }),
7633            RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }),
7634            REF_EXPR => Expr::RefExpr(RefExpr { syntax }),
7635            RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
7636            TRY_EXPR => Expr::TryExpr(TryExpr { syntax }),
7637            TUPLE_EXPR => Expr::TupleExpr(TupleExpr { syntax }),
7638            UNDERSCORE_EXPR => Expr::UnderscoreExpr(UnderscoreExpr { syntax }),
7639            WHILE_EXPR => Expr::WhileExpr(WhileExpr { syntax }),
7640            YEET_EXPR => Expr::YeetExpr(YeetExpr { syntax }),
7641            YIELD_EXPR => Expr::YieldExpr(YieldExpr { syntax }),
7642            _ => return None,
7643        };
7644        Some(res)
7645    }
7646    #[inline]
7647    fn syntax(&self) -> &SyntaxNode {
7648        match self {
7649            Expr::ArrayExpr(it) => &it.syntax,
7650            Expr::AsmExpr(it) => &it.syntax,
7651            Expr::AwaitExpr(it) => &it.syntax,
7652            Expr::BecomeExpr(it) => &it.syntax,
7653            Expr::BinExpr(it) => &it.syntax,
7654            Expr::BlockExpr(it) => &it.syntax,
7655            Expr::BreakExpr(it) => &it.syntax,
7656            Expr::CallExpr(it) => &it.syntax,
7657            Expr::CastExpr(it) => &it.syntax,
7658            Expr::ClosureExpr(it) => &it.syntax,
7659            Expr::ContinueExpr(it) => &it.syntax,
7660            Expr::FieldExpr(it) => &it.syntax,
7661            Expr::ForExpr(it) => &it.syntax,
7662            Expr::FormatArgsExpr(it) => &it.syntax,
7663            Expr::IfExpr(it) => &it.syntax,
7664            Expr::IndexExpr(it) => &it.syntax,
7665            Expr::LetExpr(it) => &it.syntax,
7666            Expr::Literal(it) => &it.syntax,
7667            Expr::LoopExpr(it) => &it.syntax,
7668            Expr::MacroExpr(it) => &it.syntax,
7669            Expr::MatchExpr(it) => &it.syntax,
7670            Expr::MethodCallExpr(it) => &it.syntax,
7671            Expr::OffsetOfExpr(it) => &it.syntax,
7672            Expr::ParenExpr(it) => &it.syntax,
7673            Expr::PathExpr(it) => &it.syntax,
7674            Expr::PrefixExpr(it) => &it.syntax,
7675            Expr::RangeExpr(it) => &it.syntax,
7676            Expr::RecordExpr(it) => &it.syntax,
7677            Expr::RefExpr(it) => &it.syntax,
7678            Expr::ReturnExpr(it) => &it.syntax,
7679            Expr::TryExpr(it) => &it.syntax,
7680            Expr::TupleExpr(it) => &it.syntax,
7681            Expr::UnderscoreExpr(it) => &it.syntax,
7682            Expr::WhileExpr(it) => &it.syntax,
7683            Expr::YeetExpr(it) => &it.syntax,
7684            Expr::YieldExpr(it) => &it.syntax,
7685        }
7686    }
7687}
7688impl From<Fn> for ExternItem {
7689    #[inline]
7690    fn from(node: Fn) -> ExternItem { ExternItem::Fn(node) }
7691}
7692impl From<MacroCall> for ExternItem {
7693    #[inline]
7694    fn from(node: MacroCall) -> ExternItem { ExternItem::MacroCall(node) }
7695}
7696impl From<Static> for ExternItem {
7697    #[inline]
7698    fn from(node: Static) -> ExternItem { ExternItem::Static(node) }
7699}
7700impl From<TypeAlias> for ExternItem {
7701    #[inline]
7702    fn from(node: TypeAlias) -> ExternItem { ExternItem::TypeAlias(node) }
7703}
7704impl AstNode for ExternItem {
7705    #[inline]
7706    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, FN | MACRO_CALL | STATIC | TYPE_ALIAS) }
7707    #[inline]
7708    fn cast(syntax: SyntaxNode) -> Option<Self> {
7709        let res = match syntax.kind() {
7710            FN => ExternItem::Fn(Fn { syntax }),
7711            MACRO_CALL => ExternItem::MacroCall(MacroCall { syntax }),
7712            STATIC => ExternItem::Static(Static { syntax }),
7713            TYPE_ALIAS => ExternItem::TypeAlias(TypeAlias { syntax }),
7714            _ => return None,
7715        };
7716        Some(res)
7717    }
7718    #[inline]
7719    fn syntax(&self) -> &SyntaxNode {
7720        match self {
7721            ExternItem::Fn(it) => &it.syntax,
7722            ExternItem::MacroCall(it) => &it.syntax,
7723            ExternItem::Static(it) => &it.syntax,
7724            ExternItem::TypeAlias(it) => &it.syntax,
7725        }
7726    }
7727}
7728impl From<RecordFieldList> for FieldList {
7729    #[inline]
7730    fn from(node: RecordFieldList) -> FieldList { FieldList::RecordFieldList(node) }
7731}
7732impl From<TupleFieldList> for FieldList {
7733    #[inline]
7734    fn from(node: TupleFieldList) -> FieldList { FieldList::TupleFieldList(node) }
7735}
7736impl AstNode for FieldList {
7737    #[inline]
7738    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, RECORD_FIELD_LIST | TUPLE_FIELD_LIST) }
7739    #[inline]
7740    fn cast(syntax: SyntaxNode) -> Option<Self> {
7741        let res = match syntax.kind() {
7742            RECORD_FIELD_LIST => FieldList::RecordFieldList(RecordFieldList { syntax }),
7743            TUPLE_FIELD_LIST => FieldList::TupleFieldList(TupleFieldList { syntax }),
7744            _ => return None,
7745        };
7746        Some(res)
7747    }
7748    #[inline]
7749    fn syntax(&self) -> &SyntaxNode {
7750        match self {
7751            FieldList::RecordFieldList(it) => &it.syntax,
7752            FieldList::TupleFieldList(it) => &it.syntax,
7753        }
7754    }
7755}
7756impl From<AssocTypeArg> for GenericArg {
7757    #[inline]
7758    fn from(node: AssocTypeArg) -> GenericArg { GenericArg::AssocTypeArg(node) }
7759}
7760impl From<ConstArg> for GenericArg {
7761    #[inline]
7762    fn from(node: ConstArg) -> GenericArg { GenericArg::ConstArg(node) }
7763}
7764impl From<LifetimeArg> for GenericArg {
7765    #[inline]
7766    fn from(node: LifetimeArg) -> GenericArg { GenericArg::LifetimeArg(node) }
7767}
7768impl From<TypeArg> for GenericArg {
7769    #[inline]
7770    fn from(node: TypeArg) -> GenericArg { GenericArg::TypeArg(node) }
7771}
7772impl AstNode for GenericArg {
7773    #[inline]
7774    fn can_cast(kind: SyntaxKind) -> bool {
7775        matches!(kind, ASSOC_TYPE_ARG | CONST_ARG | LIFETIME_ARG | TYPE_ARG)
7776    }
7777    #[inline]
7778    fn cast(syntax: SyntaxNode) -> Option<Self> {
7779        let res = match syntax.kind() {
7780            ASSOC_TYPE_ARG => GenericArg::AssocTypeArg(AssocTypeArg { syntax }),
7781            CONST_ARG => GenericArg::ConstArg(ConstArg { syntax }),
7782            LIFETIME_ARG => GenericArg::LifetimeArg(LifetimeArg { syntax }),
7783            TYPE_ARG => GenericArg::TypeArg(TypeArg { syntax }),
7784            _ => return None,
7785        };
7786        Some(res)
7787    }
7788    #[inline]
7789    fn syntax(&self) -> &SyntaxNode {
7790        match self {
7791            GenericArg::AssocTypeArg(it) => &it.syntax,
7792            GenericArg::ConstArg(it) => &it.syntax,
7793            GenericArg::LifetimeArg(it) => &it.syntax,
7794            GenericArg::TypeArg(it) => &it.syntax,
7795        }
7796    }
7797}
7798impl From<ConstParam> for GenericParam {
7799    #[inline]
7800    fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) }
7801}
7802impl From<LifetimeParam> for GenericParam {
7803    #[inline]
7804    fn from(node: LifetimeParam) -> GenericParam { GenericParam::LifetimeParam(node) }
7805}
7806impl From<TypeParam> for GenericParam {
7807    #[inline]
7808    fn from(node: TypeParam) -> GenericParam { GenericParam::TypeParam(node) }
7809}
7810impl AstNode for GenericParam {
7811    #[inline]
7812    fn can_cast(kind: SyntaxKind) -> bool {
7813        matches!(kind, CONST_PARAM | LIFETIME_PARAM | TYPE_PARAM)
7814    }
7815    #[inline]
7816    fn cast(syntax: SyntaxNode) -> Option<Self> {
7817        let res = match syntax.kind() {
7818            CONST_PARAM => GenericParam::ConstParam(ConstParam { syntax }),
7819            LIFETIME_PARAM => GenericParam::LifetimeParam(LifetimeParam { syntax }),
7820            TYPE_PARAM => GenericParam::TypeParam(TypeParam { syntax }),
7821            _ => return None,
7822        };
7823        Some(res)
7824    }
7825    #[inline]
7826    fn syntax(&self) -> &SyntaxNode {
7827        match self {
7828            GenericParam::ConstParam(it) => &it.syntax,
7829            GenericParam::LifetimeParam(it) => &it.syntax,
7830            GenericParam::TypeParam(it) => &it.syntax,
7831        }
7832    }
7833}
7834impl From<AsmExpr> for Item {
7835    #[inline]
7836    fn from(node: AsmExpr) -> Item { Item::AsmExpr(node) }
7837}
7838impl From<Const> for Item {
7839    #[inline]
7840    fn from(node: Const) -> Item { Item::Const(node) }
7841}
7842impl From<Enum> for Item {
7843    #[inline]
7844    fn from(node: Enum) -> Item { Item::Enum(node) }
7845}
7846impl From<ExternBlock> for Item {
7847    #[inline]
7848    fn from(node: ExternBlock) -> Item { Item::ExternBlock(node) }
7849}
7850impl From<ExternCrate> for Item {
7851    #[inline]
7852    fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) }
7853}
7854impl From<Fn> for Item {
7855    #[inline]
7856    fn from(node: Fn) -> Item { Item::Fn(node) }
7857}
7858impl From<Impl> for Item {
7859    #[inline]
7860    fn from(node: Impl) -> Item { Item::Impl(node) }
7861}
7862impl From<MacroCall> for Item {
7863    #[inline]
7864    fn from(node: MacroCall) -> Item { Item::MacroCall(node) }
7865}
7866impl From<MacroDef> for Item {
7867    #[inline]
7868    fn from(node: MacroDef) -> Item { Item::MacroDef(node) }
7869}
7870impl From<MacroRules> for Item {
7871    #[inline]
7872    fn from(node: MacroRules) -> Item { Item::MacroRules(node) }
7873}
7874impl From<Module> for Item {
7875    #[inline]
7876    fn from(node: Module) -> Item { Item::Module(node) }
7877}
7878impl From<Static> for Item {
7879    #[inline]
7880    fn from(node: Static) -> Item { Item::Static(node) }
7881}
7882impl From<Struct> for Item {
7883    #[inline]
7884    fn from(node: Struct) -> Item { Item::Struct(node) }
7885}
7886impl From<Trait> for Item {
7887    #[inline]
7888    fn from(node: Trait) -> Item { Item::Trait(node) }
7889}
7890impl From<TypeAlias> for Item {
7891    #[inline]
7892    fn from(node: TypeAlias) -> Item { Item::TypeAlias(node) }
7893}
7894impl From<Union> for Item {
7895    #[inline]
7896    fn from(node: Union) -> Item { Item::Union(node) }
7897}
7898impl From<Use> for Item {
7899    #[inline]
7900    fn from(node: Use) -> Item { Item::Use(node) }
7901}
7902impl AstNode for Item {
7903    #[inline]
7904    fn can_cast(kind: SyntaxKind) -> bool {
7905        matches!(
7906            kind,
7907            ASM_EXPR
7908                | CONST
7909                | ENUM
7910                | EXTERN_BLOCK
7911                | EXTERN_CRATE
7912                | FN
7913                | IMPL
7914                | MACRO_CALL
7915                | MACRO_DEF
7916                | MACRO_RULES
7917                | MODULE
7918                | STATIC
7919                | STRUCT
7920                | TRAIT
7921                | TYPE_ALIAS
7922                | UNION
7923                | USE
7924        )
7925    }
7926    #[inline]
7927    fn cast(syntax: SyntaxNode) -> Option<Self> {
7928        let res = match syntax.kind() {
7929            ASM_EXPR => Item::AsmExpr(AsmExpr { syntax }),
7930            CONST => Item::Const(Const { syntax }),
7931            ENUM => Item::Enum(Enum { syntax }),
7932            EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }),
7933            EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }),
7934            FN => Item::Fn(Fn { syntax }),
7935            IMPL => Item::Impl(Impl { syntax }),
7936            MACRO_CALL => Item::MacroCall(MacroCall { syntax }),
7937            MACRO_DEF => Item::MacroDef(MacroDef { syntax }),
7938            MACRO_RULES => Item::MacroRules(MacroRules { syntax }),
7939            MODULE => Item::Module(Module { syntax }),
7940            STATIC => Item::Static(Static { syntax }),
7941            STRUCT => Item::Struct(Struct { syntax }),
7942            TRAIT => Item::Trait(Trait { syntax }),
7943            TYPE_ALIAS => Item::TypeAlias(TypeAlias { syntax }),
7944            UNION => Item::Union(Union { syntax }),
7945            USE => Item::Use(Use { syntax }),
7946            _ => return None,
7947        };
7948        Some(res)
7949    }
7950    #[inline]
7951    fn syntax(&self) -> &SyntaxNode {
7952        match self {
7953            Item::AsmExpr(it) => &it.syntax,
7954            Item::Const(it) => &it.syntax,
7955            Item::Enum(it) => &it.syntax,
7956            Item::ExternBlock(it) => &it.syntax,
7957            Item::ExternCrate(it) => &it.syntax,
7958            Item::Fn(it) => &it.syntax,
7959            Item::Impl(it) => &it.syntax,
7960            Item::MacroCall(it) => &it.syntax,
7961            Item::MacroDef(it) => &it.syntax,
7962            Item::MacroRules(it) => &it.syntax,
7963            Item::Module(it) => &it.syntax,
7964            Item::Static(it) => &it.syntax,
7965            Item::Struct(it) => &it.syntax,
7966            Item::Trait(it) => &it.syntax,
7967            Item::TypeAlias(it) => &it.syntax,
7968            Item::Union(it) => &it.syntax,
7969            Item::Use(it) => &it.syntax,
7970        }
7971    }
7972}
7973impl From<BoxPat> for Pat {
7974    #[inline]
7975    fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
7976}
7977impl From<ConstBlockPat> for Pat {
7978    #[inline]
7979    fn from(node: ConstBlockPat) -> Pat { Pat::ConstBlockPat(node) }
7980}
7981impl From<IdentPat> for Pat {
7982    #[inline]
7983    fn from(node: IdentPat) -> Pat { Pat::IdentPat(node) }
7984}
7985impl From<LiteralPat> for Pat {
7986    #[inline]
7987    fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
7988}
7989impl From<MacroPat> for Pat {
7990    #[inline]
7991    fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) }
7992}
7993impl From<OrPat> for Pat {
7994    #[inline]
7995    fn from(node: OrPat) -> Pat { Pat::OrPat(node) }
7996}
7997impl From<ParenPat> for Pat {
7998    #[inline]
7999    fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) }
8000}
8001impl From<PathPat> for Pat {
8002    #[inline]
8003    fn from(node: PathPat) -> Pat { Pat::PathPat(node) }
8004}
8005impl From<RangePat> for Pat {
8006    #[inline]
8007    fn from(node: RangePat) -> Pat { Pat::RangePat(node) }
8008}
8009impl From<RecordPat> for Pat {
8010    #[inline]
8011    fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) }
8012}
8013impl From<RefPat> for Pat {
8014    #[inline]
8015    fn from(node: RefPat) -> Pat { Pat::RefPat(node) }
8016}
8017impl From<RestPat> for Pat {
8018    #[inline]
8019    fn from(node: RestPat) -> Pat { Pat::RestPat(node) }
8020}
8021impl From<SlicePat> for Pat {
8022    #[inline]
8023    fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) }
8024}
8025impl From<TuplePat> for Pat {
8026    #[inline]
8027    fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) }
8028}
8029impl From<TupleStructPat> for Pat {
8030    #[inline]
8031    fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) }
8032}
8033impl From<WildcardPat> for Pat {
8034    #[inline]
8035    fn from(node: WildcardPat) -> Pat { Pat::WildcardPat(node) }
8036}
8037impl AstNode for Pat {
8038    #[inline]
8039    fn can_cast(kind: SyntaxKind) -> bool {
8040        matches!(
8041            kind,
8042            BOX_PAT
8043                | CONST_BLOCK_PAT
8044                | IDENT_PAT
8045                | LITERAL_PAT
8046                | MACRO_PAT
8047                | OR_PAT
8048                | PAREN_PAT
8049                | PATH_PAT
8050                | RANGE_PAT
8051                | RECORD_PAT
8052                | REF_PAT
8053                | REST_PAT
8054                | SLICE_PAT
8055                | TUPLE_PAT
8056                | TUPLE_STRUCT_PAT
8057                | WILDCARD_PAT
8058        )
8059    }
8060    #[inline]
8061    fn cast(syntax: SyntaxNode) -> Option<Self> {
8062        let res = match syntax.kind() {
8063            BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
8064            CONST_BLOCK_PAT => Pat::ConstBlockPat(ConstBlockPat { syntax }),
8065            IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
8066            LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
8067            MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
8068            OR_PAT => Pat::OrPat(OrPat { syntax }),
8069            PAREN_PAT => Pat::ParenPat(ParenPat { syntax }),
8070            PATH_PAT => Pat::PathPat(PathPat { syntax }),
8071            RANGE_PAT => Pat::RangePat(RangePat { syntax }),
8072            RECORD_PAT => Pat::RecordPat(RecordPat { syntax }),
8073            REF_PAT => Pat::RefPat(RefPat { syntax }),
8074            REST_PAT => Pat::RestPat(RestPat { syntax }),
8075            SLICE_PAT => Pat::SlicePat(SlicePat { syntax }),
8076            TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }),
8077            TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }),
8078            WILDCARD_PAT => Pat::WildcardPat(WildcardPat { syntax }),
8079            _ => return None,
8080        };
8081        Some(res)
8082    }
8083    #[inline]
8084    fn syntax(&self) -> &SyntaxNode {
8085        match self {
8086            Pat::BoxPat(it) => &it.syntax,
8087            Pat::ConstBlockPat(it) => &it.syntax,
8088            Pat::IdentPat(it) => &it.syntax,
8089            Pat::LiteralPat(it) => &it.syntax,
8090            Pat::MacroPat(it) => &it.syntax,
8091            Pat::OrPat(it) => &it.syntax,
8092            Pat::ParenPat(it) => &it.syntax,
8093            Pat::PathPat(it) => &it.syntax,
8094            Pat::RangePat(it) => &it.syntax,
8095            Pat::RecordPat(it) => &it.syntax,
8096            Pat::RefPat(it) => &it.syntax,
8097            Pat::RestPat(it) => &it.syntax,
8098            Pat::SlicePat(it) => &it.syntax,
8099            Pat::TuplePat(it) => &it.syntax,
8100            Pat::TupleStructPat(it) => &it.syntax,
8101            Pat::WildcardPat(it) => &it.syntax,
8102        }
8103    }
8104}
8105impl From<ExprStmt> for Stmt {
8106    #[inline]
8107    fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) }
8108}
8109impl From<Item> for Stmt {
8110    #[inline]
8111    fn from(node: Item) -> Stmt { Stmt::Item(node) }
8112}
8113impl From<LetStmt> for Stmt {
8114    #[inline]
8115    fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
8116}
8117impl From<ArrayType> for Type {
8118    #[inline]
8119    fn from(node: ArrayType) -> Type { Type::ArrayType(node) }
8120}
8121impl From<DynTraitType> for Type {
8122    #[inline]
8123    fn from(node: DynTraitType) -> Type { Type::DynTraitType(node) }
8124}
8125impl From<FnPtrType> for Type {
8126    #[inline]
8127    fn from(node: FnPtrType) -> Type { Type::FnPtrType(node) }
8128}
8129impl From<ForType> for Type {
8130    #[inline]
8131    fn from(node: ForType) -> Type { Type::ForType(node) }
8132}
8133impl From<ImplTraitType> for Type {
8134    #[inline]
8135    fn from(node: ImplTraitType) -> Type { Type::ImplTraitType(node) }
8136}
8137impl From<InferType> for Type {
8138    #[inline]
8139    fn from(node: InferType) -> Type { Type::InferType(node) }
8140}
8141impl From<MacroType> for Type {
8142    #[inline]
8143    fn from(node: MacroType) -> Type { Type::MacroType(node) }
8144}
8145impl From<NeverType> for Type {
8146    #[inline]
8147    fn from(node: NeverType) -> Type { Type::NeverType(node) }
8148}
8149impl From<ParenType> for Type {
8150    #[inline]
8151    fn from(node: ParenType) -> Type { Type::ParenType(node) }
8152}
8153impl From<PathType> for Type {
8154    #[inline]
8155    fn from(node: PathType) -> Type { Type::PathType(node) }
8156}
8157impl From<PtrType> for Type {
8158    #[inline]
8159    fn from(node: PtrType) -> Type { Type::PtrType(node) }
8160}
8161impl From<RefType> for Type {
8162    #[inline]
8163    fn from(node: RefType) -> Type { Type::RefType(node) }
8164}
8165impl From<SliceType> for Type {
8166    #[inline]
8167    fn from(node: SliceType) -> Type { Type::SliceType(node) }
8168}
8169impl From<TupleType> for Type {
8170    #[inline]
8171    fn from(node: TupleType) -> Type { Type::TupleType(node) }
8172}
8173impl AstNode for Type {
8174    #[inline]
8175    fn can_cast(kind: SyntaxKind) -> bool {
8176        matches!(
8177            kind,
8178            ARRAY_TYPE
8179                | DYN_TRAIT_TYPE
8180                | FN_PTR_TYPE
8181                | FOR_TYPE
8182                | IMPL_TRAIT_TYPE
8183                | INFER_TYPE
8184                | MACRO_TYPE
8185                | NEVER_TYPE
8186                | PAREN_TYPE
8187                | PATH_TYPE
8188                | PTR_TYPE
8189                | REF_TYPE
8190                | SLICE_TYPE
8191                | TUPLE_TYPE
8192        )
8193    }
8194    #[inline]
8195    fn cast(syntax: SyntaxNode) -> Option<Self> {
8196        let res = match syntax.kind() {
8197            ARRAY_TYPE => Type::ArrayType(ArrayType { syntax }),
8198            DYN_TRAIT_TYPE => Type::DynTraitType(DynTraitType { syntax }),
8199            FN_PTR_TYPE => Type::FnPtrType(FnPtrType { syntax }),
8200            FOR_TYPE => Type::ForType(ForType { syntax }),
8201            IMPL_TRAIT_TYPE => Type::ImplTraitType(ImplTraitType { syntax }),
8202            INFER_TYPE => Type::InferType(InferType { syntax }),
8203            MACRO_TYPE => Type::MacroType(MacroType { syntax }),
8204            NEVER_TYPE => Type::NeverType(NeverType { syntax }),
8205            PAREN_TYPE => Type::ParenType(ParenType { syntax }),
8206            PATH_TYPE => Type::PathType(PathType { syntax }),
8207            PTR_TYPE => Type::PtrType(PtrType { syntax }),
8208            REF_TYPE => Type::RefType(RefType { syntax }),
8209            SLICE_TYPE => Type::SliceType(SliceType { syntax }),
8210            TUPLE_TYPE => Type::TupleType(TupleType { syntax }),
8211            _ => return None,
8212        };
8213        Some(res)
8214    }
8215    #[inline]
8216    fn syntax(&self) -> &SyntaxNode {
8217        match self {
8218            Type::ArrayType(it) => &it.syntax,
8219            Type::DynTraitType(it) => &it.syntax,
8220            Type::FnPtrType(it) => &it.syntax,
8221            Type::ForType(it) => &it.syntax,
8222            Type::ImplTraitType(it) => &it.syntax,
8223            Type::InferType(it) => &it.syntax,
8224            Type::MacroType(it) => &it.syntax,
8225            Type::NeverType(it) => &it.syntax,
8226            Type::ParenType(it) => &it.syntax,
8227            Type::PathType(it) => &it.syntax,
8228            Type::PtrType(it) => &it.syntax,
8229            Type::RefType(it) => &it.syntax,
8230            Type::SliceType(it) => &it.syntax,
8231            Type::TupleType(it) => &it.syntax,
8232        }
8233    }
8234}
8235impl From<Lifetime> for UseBoundGenericArg {
8236    #[inline]
8237    fn from(node: Lifetime) -> UseBoundGenericArg { UseBoundGenericArg::Lifetime(node) }
8238}
8239impl From<NameRef> for UseBoundGenericArg {
8240    #[inline]
8241    fn from(node: NameRef) -> UseBoundGenericArg { UseBoundGenericArg::NameRef(node) }
8242}
8243impl AstNode for UseBoundGenericArg {
8244    #[inline]
8245    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, LIFETIME | NAME_REF) }
8246    #[inline]
8247    fn cast(syntax: SyntaxNode) -> Option<Self> {
8248        let res = match syntax.kind() {
8249            LIFETIME => UseBoundGenericArg::Lifetime(Lifetime { syntax }),
8250            NAME_REF => UseBoundGenericArg::NameRef(NameRef { syntax }),
8251            _ => return None,
8252        };
8253        Some(res)
8254    }
8255    #[inline]
8256    fn syntax(&self) -> &SyntaxNode {
8257        match self {
8258            UseBoundGenericArg::Lifetime(it) => &it.syntax,
8259            UseBoundGenericArg::NameRef(it) => &it.syntax,
8260        }
8261    }
8262}
8263impl From<Struct> for VariantDef {
8264    #[inline]
8265    fn from(node: Struct) -> VariantDef { VariantDef::Struct(node) }
8266}
8267impl From<Union> for VariantDef {
8268    #[inline]
8269    fn from(node: Union) -> VariantDef { VariantDef::Union(node) }
8270}
8271impl From<Variant> for VariantDef {
8272    #[inline]
8273    fn from(node: Variant) -> VariantDef { VariantDef::Variant(node) }
8274}
8275impl AstNode for VariantDef {
8276    #[inline]
8277    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, STRUCT | UNION | VARIANT) }
8278    #[inline]
8279    fn cast(syntax: SyntaxNode) -> Option<Self> {
8280        let res = match syntax.kind() {
8281            STRUCT => VariantDef::Struct(Struct { syntax }),
8282            UNION => VariantDef::Union(Union { syntax }),
8283            VARIANT => VariantDef::Variant(Variant { syntax }),
8284            _ => return None,
8285        };
8286        Some(res)
8287    }
8288    #[inline]
8289    fn syntax(&self) -> &SyntaxNode {
8290        match self {
8291            VariantDef::Struct(it) => &it.syntax,
8292            VariantDef::Union(it) => &it.syntax,
8293            VariantDef::Variant(it) => &it.syntax,
8294        }
8295    }
8296}
8297impl ast::HasArgList for AnyHasArgList {}
8298impl AstNode for AnyHasArgList {
8299    #[inline]
8300    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CALL_EXPR | METHOD_CALL_EXPR) }
8301    #[inline]
8302    fn cast(syntax: SyntaxNode) -> Option<Self> {
8303        Self::can_cast(syntax.kind()).then_some(AnyHasArgList { syntax })
8304    }
8305    #[inline]
8306    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8307}
8308impl hash::Hash for AnyHasArgList {
8309    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8310}
8311impl Eq for AnyHasArgList {}
8312impl PartialEq for AnyHasArgList {
8313    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8314}
8315impl Clone for AnyHasArgList {
8316    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8317}
8318impl fmt::Debug for AnyHasArgList {
8319    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8320        f.debug_struct("AnyHasArgList").field("syntax", &self.syntax).finish()
8321    }
8322}
8323impl From<CallExpr> for AnyHasArgList {
8324    #[inline]
8325    fn from(node: CallExpr) -> AnyHasArgList { AnyHasArgList { syntax: node.syntax } }
8326}
8327impl From<MethodCallExpr> for AnyHasArgList {
8328    #[inline]
8329    fn from(node: MethodCallExpr) -> AnyHasArgList { AnyHasArgList { syntax: node.syntax } }
8330}
8331impl ast::HasAttrs for AnyHasAttrs {}
8332impl AstNode for AnyHasAttrs {
8333    #[inline]
8334    fn can_cast(kind: SyntaxKind) -> bool {
8335        matches!(
8336            kind,
8337            ARRAY_EXPR
8338                | ASM_EXPR
8339                | ASSOC_ITEM_LIST
8340                | AWAIT_EXPR
8341                | BECOME_EXPR
8342                | BIN_EXPR
8343                | BLOCK_EXPR
8344                | BREAK_EXPR
8345                | CALL_EXPR
8346                | CAST_EXPR
8347                | CLOSURE_EXPR
8348                | CONST
8349                | CONST_PARAM
8350                | CONTINUE_EXPR
8351                | ENUM
8352                | EXTERN_BLOCK
8353                | EXTERN_CRATE
8354                | EXTERN_ITEM_LIST
8355                | FIELD_EXPR
8356                | FN
8357                | FOR_EXPR
8358                | FORMAT_ARGS_EXPR
8359                | IDENT_PAT
8360                | IF_EXPR
8361                | IMPL
8362                | INDEX_EXPR
8363                | ITEM_LIST
8364                | LET_EXPR
8365                | LET_STMT
8366                | LIFETIME_PARAM
8367                | LITERAL
8368                | LOOP_EXPR
8369                | MACRO_CALL
8370                | MACRO_DEF
8371                | MACRO_RULES
8372                | MATCH_ARM
8373                | MATCH_ARM_LIST
8374                | MATCH_EXPR
8375                | METHOD_CALL_EXPR
8376                | MODULE
8377                | OFFSET_OF_EXPR
8378                | PARAM
8379                | PAREN_EXPR
8380                | PATH_EXPR
8381                | PREFIX_EXPR
8382                | RANGE_EXPR
8383                | RECORD_EXPR_FIELD
8384                | RECORD_EXPR_FIELD_LIST
8385                | RECORD_FIELD
8386                | RECORD_PAT_FIELD
8387                | REF_EXPR
8388                | REST_PAT
8389                | RETURN_EXPR
8390                | SELF_PARAM
8391                | SOURCE_FILE
8392                | STATIC
8393                | STMT_LIST
8394                | STRUCT
8395                | TRAIT
8396                | TRY_EXPR
8397                | TUPLE_EXPR
8398                | TUPLE_FIELD
8399                | TYPE_ALIAS
8400                | TYPE_PARAM
8401                | UNDERSCORE_EXPR
8402                | UNION
8403                | USE
8404                | VARIANT
8405                | WHILE_EXPR
8406                | YEET_EXPR
8407                | YIELD_EXPR
8408        )
8409    }
8410    #[inline]
8411    fn cast(syntax: SyntaxNode) -> Option<Self> {
8412        Self::can_cast(syntax.kind()).then_some(AnyHasAttrs { syntax })
8413    }
8414    #[inline]
8415    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8416}
8417impl hash::Hash for AnyHasAttrs {
8418    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8419}
8420impl Eq for AnyHasAttrs {}
8421impl PartialEq for AnyHasAttrs {
8422    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8423}
8424impl Clone for AnyHasAttrs {
8425    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8426}
8427impl fmt::Debug for AnyHasAttrs {
8428    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8429        f.debug_struct("AnyHasAttrs").field("syntax", &self.syntax).finish()
8430    }
8431}
8432impl From<ArrayExpr> for AnyHasAttrs {
8433    #[inline]
8434    fn from(node: ArrayExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8435}
8436impl From<AsmExpr> for AnyHasAttrs {
8437    #[inline]
8438    fn from(node: AsmExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8439}
8440impl From<AssocItemList> for AnyHasAttrs {
8441    #[inline]
8442    fn from(node: AssocItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8443}
8444impl From<AwaitExpr> for AnyHasAttrs {
8445    #[inline]
8446    fn from(node: AwaitExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8447}
8448impl From<BecomeExpr> for AnyHasAttrs {
8449    #[inline]
8450    fn from(node: BecomeExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8451}
8452impl From<BinExpr> for AnyHasAttrs {
8453    #[inline]
8454    fn from(node: BinExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8455}
8456impl From<BlockExpr> for AnyHasAttrs {
8457    #[inline]
8458    fn from(node: BlockExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8459}
8460impl From<BreakExpr> for AnyHasAttrs {
8461    #[inline]
8462    fn from(node: BreakExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8463}
8464impl From<CallExpr> for AnyHasAttrs {
8465    #[inline]
8466    fn from(node: CallExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8467}
8468impl From<CastExpr> for AnyHasAttrs {
8469    #[inline]
8470    fn from(node: CastExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8471}
8472impl From<ClosureExpr> for AnyHasAttrs {
8473    #[inline]
8474    fn from(node: ClosureExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8475}
8476impl From<Const> for AnyHasAttrs {
8477    #[inline]
8478    fn from(node: Const) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8479}
8480impl From<ConstParam> for AnyHasAttrs {
8481    #[inline]
8482    fn from(node: ConstParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8483}
8484impl From<ContinueExpr> for AnyHasAttrs {
8485    #[inline]
8486    fn from(node: ContinueExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8487}
8488impl From<Enum> for AnyHasAttrs {
8489    #[inline]
8490    fn from(node: Enum) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8491}
8492impl From<ExternBlock> for AnyHasAttrs {
8493    #[inline]
8494    fn from(node: ExternBlock) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8495}
8496impl From<ExternCrate> for AnyHasAttrs {
8497    #[inline]
8498    fn from(node: ExternCrate) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8499}
8500impl From<ExternItemList> for AnyHasAttrs {
8501    #[inline]
8502    fn from(node: ExternItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8503}
8504impl From<FieldExpr> for AnyHasAttrs {
8505    #[inline]
8506    fn from(node: FieldExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8507}
8508impl From<Fn> for AnyHasAttrs {
8509    #[inline]
8510    fn from(node: Fn) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8511}
8512impl From<ForExpr> for AnyHasAttrs {
8513    #[inline]
8514    fn from(node: ForExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8515}
8516impl From<FormatArgsExpr> for AnyHasAttrs {
8517    #[inline]
8518    fn from(node: FormatArgsExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8519}
8520impl From<IdentPat> for AnyHasAttrs {
8521    #[inline]
8522    fn from(node: IdentPat) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8523}
8524impl From<IfExpr> for AnyHasAttrs {
8525    #[inline]
8526    fn from(node: IfExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8527}
8528impl From<Impl> for AnyHasAttrs {
8529    #[inline]
8530    fn from(node: Impl) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8531}
8532impl From<IndexExpr> for AnyHasAttrs {
8533    #[inline]
8534    fn from(node: IndexExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8535}
8536impl From<ItemList> for AnyHasAttrs {
8537    #[inline]
8538    fn from(node: ItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8539}
8540impl From<LetExpr> for AnyHasAttrs {
8541    #[inline]
8542    fn from(node: LetExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8543}
8544impl From<LetStmt> for AnyHasAttrs {
8545    #[inline]
8546    fn from(node: LetStmt) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8547}
8548impl From<LifetimeParam> for AnyHasAttrs {
8549    #[inline]
8550    fn from(node: LifetimeParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8551}
8552impl From<Literal> for AnyHasAttrs {
8553    #[inline]
8554    fn from(node: Literal) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8555}
8556impl From<LoopExpr> for AnyHasAttrs {
8557    #[inline]
8558    fn from(node: LoopExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8559}
8560impl From<MacroCall> for AnyHasAttrs {
8561    #[inline]
8562    fn from(node: MacroCall) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8563}
8564impl From<MacroDef> for AnyHasAttrs {
8565    #[inline]
8566    fn from(node: MacroDef) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8567}
8568impl From<MacroRules> for AnyHasAttrs {
8569    #[inline]
8570    fn from(node: MacroRules) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8571}
8572impl From<MatchArm> for AnyHasAttrs {
8573    #[inline]
8574    fn from(node: MatchArm) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8575}
8576impl From<MatchArmList> for AnyHasAttrs {
8577    #[inline]
8578    fn from(node: MatchArmList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8579}
8580impl From<MatchExpr> for AnyHasAttrs {
8581    #[inline]
8582    fn from(node: MatchExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8583}
8584impl From<MethodCallExpr> for AnyHasAttrs {
8585    #[inline]
8586    fn from(node: MethodCallExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8587}
8588impl From<Module> for AnyHasAttrs {
8589    #[inline]
8590    fn from(node: Module) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8591}
8592impl From<OffsetOfExpr> for AnyHasAttrs {
8593    #[inline]
8594    fn from(node: OffsetOfExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8595}
8596impl From<Param> for AnyHasAttrs {
8597    #[inline]
8598    fn from(node: Param) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8599}
8600impl From<ParenExpr> for AnyHasAttrs {
8601    #[inline]
8602    fn from(node: ParenExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8603}
8604impl From<PathExpr> for AnyHasAttrs {
8605    #[inline]
8606    fn from(node: PathExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8607}
8608impl From<PrefixExpr> for AnyHasAttrs {
8609    #[inline]
8610    fn from(node: PrefixExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8611}
8612impl From<RangeExpr> for AnyHasAttrs {
8613    #[inline]
8614    fn from(node: RangeExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8615}
8616impl From<RecordExprField> for AnyHasAttrs {
8617    #[inline]
8618    fn from(node: RecordExprField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8619}
8620impl From<RecordExprFieldList> for AnyHasAttrs {
8621    #[inline]
8622    fn from(node: RecordExprFieldList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8623}
8624impl From<RecordField> for AnyHasAttrs {
8625    #[inline]
8626    fn from(node: RecordField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8627}
8628impl From<RecordPatField> for AnyHasAttrs {
8629    #[inline]
8630    fn from(node: RecordPatField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8631}
8632impl From<RefExpr> for AnyHasAttrs {
8633    #[inline]
8634    fn from(node: RefExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8635}
8636impl From<RestPat> for AnyHasAttrs {
8637    #[inline]
8638    fn from(node: RestPat) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8639}
8640impl From<ReturnExpr> for AnyHasAttrs {
8641    #[inline]
8642    fn from(node: ReturnExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8643}
8644impl From<SelfParam> for AnyHasAttrs {
8645    #[inline]
8646    fn from(node: SelfParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8647}
8648impl From<SourceFile> for AnyHasAttrs {
8649    #[inline]
8650    fn from(node: SourceFile) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8651}
8652impl From<Static> for AnyHasAttrs {
8653    #[inline]
8654    fn from(node: Static) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8655}
8656impl From<StmtList> for AnyHasAttrs {
8657    #[inline]
8658    fn from(node: StmtList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8659}
8660impl From<Struct> for AnyHasAttrs {
8661    #[inline]
8662    fn from(node: Struct) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8663}
8664impl From<Trait> for AnyHasAttrs {
8665    #[inline]
8666    fn from(node: Trait) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8667}
8668impl From<TryExpr> for AnyHasAttrs {
8669    #[inline]
8670    fn from(node: TryExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8671}
8672impl From<TupleExpr> for AnyHasAttrs {
8673    #[inline]
8674    fn from(node: TupleExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8675}
8676impl From<TupleField> for AnyHasAttrs {
8677    #[inline]
8678    fn from(node: TupleField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8679}
8680impl From<TypeAlias> for AnyHasAttrs {
8681    #[inline]
8682    fn from(node: TypeAlias) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8683}
8684impl From<TypeParam> for AnyHasAttrs {
8685    #[inline]
8686    fn from(node: TypeParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8687}
8688impl From<UnderscoreExpr> for AnyHasAttrs {
8689    #[inline]
8690    fn from(node: UnderscoreExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8691}
8692impl From<Union> for AnyHasAttrs {
8693    #[inline]
8694    fn from(node: Union) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8695}
8696impl From<Use> for AnyHasAttrs {
8697    #[inline]
8698    fn from(node: Use) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8699}
8700impl From<Variant> for AnyHasAttrs {
8701    #[inline]
8702    fn from(node: Variant) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8703}
8704impl From<WhileExpr> for AnyHasAttrs {
8705    #[inline]
8706    fn from(node: WhileExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8707}
8708impl From<YeetExpr> for AnyHasAttrs {
8709    #[inline]
8710    fn from(node: YeetExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8711}
8712impl From<YieldExpr> for AnyHasAttrs {
8713    #[inline]
8714    fn from(node: YieldExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
8715}
8716impl ast::HasDocComments for AnyHasDocComments {}
8717impl AstNode for AnyHasDocComments {
8718    #[inline]
8719    fn can_cast(kind: SyntaxKind) -> bool {
8720        matches!(
8721            kind,
8722            CONST
8723                | ENUM
8724                | EXTERN_BLOCK
8725                | EXTERN_CRATE
8726                | FN
8727                | IMPL
8728                | MACRO_CALL
8729                | MACRO_DEF
8730                | MACRO_RULES
8731                | MODULE
8732                | RECORD_FIELD
8733                | SOURCE_FILE
8734                | STATIC
8735                | STRUCT
8736                | TRAIT
8737                | TUPLE_FIELD
8738                | TYPE_ALIAS
8739                | UNION
8740                | USE
8741                | VARIANT
8742        )
8743    }
8744    #[inline]
8745    fn cast(syntax: SyntaxNode) -> Option<Self> {
8746        Self::can_cast(syntax.kind()).then_some(AnyHasDocComments { syntax })
8747    }
8748    #[inline]
8749    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8750}
8751impl hash::Hash for AnyHasDocComments {
8752    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8753}
8754impl Eq for AnyHasDocComments {}
8755impl PartialEq for AnyHasDocComments {
8756    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8757}
8758impl Clone for AnyHasDocComments {
8759    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8760}
8761impl fmt::Debug for AnyHasDocComments {
8762    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8763        f.debug_struct("AnyHasDocComments").field("syntax", &self.syntax).finish()
8764    }
8765}
8766impl From<Const> for AnyHasDocComments {
8767    #[inline]
8768    fn from(node: Const) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8769}
8770impl From<Enum> for AnyHasDocComments {
8771    #[inline]
8772    fn from(node: Enum) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8773}
8774impl From<ExternBlock> for AnyHasDocComments {
8775    #[inline]
8776    fn from(node: ExternBlock) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8777}
8778impl From<ExternCrate> for AnyHasDocComments {
8779    #[inline]
8780    fn from(node: ExternCrate) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8781}
8782impl From<Fn> for AnyHasDocComments {
8783    #[inline]
8784    fn from(node: Fn) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8785}
8786impl From<Impl> for AnyHasDocComments {
8787    #[inline]
8788    fn from(node: Impl) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8789}
8790impl From<MacroCall> for AnyHasDocComments {
8791    #[inline]
8792    fn from(node: MacroCall) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8793}
8794impl From<MacroDef> for AnyHasDocComments {
8795    #[inline]
8796    fn from(node: MacroDef) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8797}
8798impl From<MacroRules> for AnyHasDocComments {
8799    #[inline]
8800    fn from(node: MacroRules) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8801}
8802impl From<Module> for AnyHasDocComments {
8803    #[inline]
8804    fn from(node: Module) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8805}
8806impl From<RecordField> for AnyHasDocComments {
8807    #[inline]
8808    fn from(node: RecordField) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8809}
8810impl From<SourceFile> for AnyHasDocComments {
8811    #[inline]
8812    fn from(node: SourceFile) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8813}
8814impl From<Static> for AnyHasDocComments {
8815    #[inline]
8816    fn from(node: Static) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8817}
8818impl From<Struct> for AnyHasDocComments {
8819    #[inline]
8820    fn from(node: Struct) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8821}
8822impl From<Trait> for AnyHasDocComments {
8823    #[inline]
8824    fn from(node: Trait) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8825}
8826impl From<TupleField> for AnyHasDocComments {
8827    #[inline]
8828    fn from(node: TupleField) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8829}
8830impl From<TypeAlias> for AnyHasDocComments {
8831    #[inline]
8832    fn from(node: TypeAlias) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8833}
8834impl From<Union> for AnyHasDocComments {
8835    #[inline]
8836    fn from(node: Union) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8837}
8838impl From<Use> for AnyHasDocComments {
8839    #[inline]
8840    fn from(node: Use) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8841}
8842impl From<Variant> for AnyHasDocComments {
8843    #[inline]
8844    fn from(node: Variant) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
8845}
8846impl ast::HasGenericArgs for AnyHasGenericArgs {}
8847impl AstNode for AnyHasGenericArgs {
8848    #[inline]
8849    fn can_cast(kind: SyntaxKind) -> bool {
8850        matches!(kind, ASSOC_TYPE_ARG | METHOD_CALL_EXPR | PATH_SEGMENT)
8851    }
8852    #[inline]
8853    fn cast(syntax: SyntaxNode) -> Option<Self> {
8854        Self::can_cast(syntax.kind()).then_some(AnyHasGenericArgs { syntax })
8855    }
8856    #[inline]
8857    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8858}
8859impl hash::Hash for AnyHasGenericArgs {
8860    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8861}
8862impl Eq for AnyHasGenericArgs {}
8863impl PartialEq for AnyHasGenericArgs {
8864    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8865}
8866impl Clone for AnyHasGenericArgs {
8867    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8868}
8869impl fmt::Debug for AnyHasGenericArgs {
8870    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8871        f.debug_struct("AnyHasGenericArgs").field("syntax", &self.syntax).finish()
8872    }
8873}
8874impl From<AssocTypeArg> for AnyHasGenericArgs {
8875    #[inline]
8876    fn from(node: AssocTypeArg) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
8877}
8878impl From<MethodCallExpr> for AnyHasGenericArgs {
8879    #[inline]
8880    fn from(node: MethodCallExpr) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
8881}
8882impl From<PathSegment> for AnyHasGenericArgs {
8883    #[inline]
8884    fn from(node: PathSegment) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
8885}
8886impl ast::HasGenericParams for AnyHasGenericParams {}
8887impl AstNode for AnyHasGenericParams {
8888    #[inline]
8889    fn can_cast(kind: SyntaxKind) -> bool {
8890        matches!(kind, CONST | ENUM | FN | IMPL | STRUCT | TRAIT | TYPE_ALIAS | UNION)
8891    }
8892    #[inline]
8893    fn cast(syntax: SyntaxNode) -> Option<Self> {
8894        Self::can_cast(syntax.kind()).then_some(AnyHasGenericParams { syntax })
8895    }
8896    #[inline]
8897    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8898}
8899impl hash::Hash for AnyHasGenericParams {
8900    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8901}
8902impl Eq for AnyHasGenericParams {}
8903impl PartialEq for AnyHasGenericParams {
8904    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8905}
8906impl Clone for AnyHasGenericParams {
8907    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8908}
8909impl fmt::Debug for AnyHasGenericParams {
8910    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8911        f.debug_struct("AnyHasGenericParams").field("syntax", &self.syntax).finish()
8912    }
8913}
8914impl From<Const> for AnyHasGenericParams {
8915    #[inline]
8916    fn from(node: Const) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8917}
8918impl From<Enum> for AnyHasGenericParams {
8919    #[inline]
8920    fn from(node: Enum) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8921}
8922impl From<Fn> for AnyHasGenericParams {
8923    #[inline]
8924    fn from(node: Fn) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8925}
8926impl From<Impl> for AnyHasGenericParams {
8927    #[inline]
8928    fn from(node: Impl) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8929}
8930impl From<Struct> for AnyHasGenericParams {
8931    #[inline]
8932    fn from(node: Struct) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8933}
8934impl From<Trait> for AnyHasGenericParams {
8935    #[inline]
8936    fn from(node: Trait) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8937}
8938impl From<TypeAlias> for AnyHasGenericParams {
8939    #[inline]
8940    fn from(node: TypeAlias) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8941}
8942impl From<Union> for AnyHasGenericParams {
8943    #[inline]
8944    fn from(node: Union) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
8945}
8946impl ast::HasLoopBody for AnyHasLoopBody {}
8947impl AstNode for AnyHasLoopBody {
8948    #[inline]
8949    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, FOR_EXPR | LOOP_EXPR | WHILE_EXPR) }
8950    #[inline]
8951    fn cast(syntax: SyntaxNode) -> Option<Self> {
8952        Self::can_cast(syntax.kind()).then_some(AnyHasLoopBody { syntax })
8953    }
8954    #[inline]
8955    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8956}
8957impl hash::Hash for AnyHasLoopBody {
8958    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8959}
8960impl Eq for AnyHasLoopBody {}
8961impl PartialEq for AnyHasLoopBody {
8962    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8963}
8964impl Clone for AnyHasLoopBody {
8965    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8966}
8967impl fmt::Debug for AnyHasLoopBody {
8968    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8969        f.debug_struct("AnyHasLoopBody").field("syntax", &self.syntax).finish()
8970    }
8971}
8972impl From<ForExpr> for AnyHasLoopBody {
8973    #[inline]
8974    fn from(node: ForExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
8975}
8976impl From<LoopExpr> for AnyHasLoopBody {
8977    #[inline]
8978    fn from(node: LoopExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
8979}
8980impl From<WhileExpr> for AnyHasLoopBody {
8981    #[inline]
8982    fn from(node: WhileExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
8983}
8984impl ast::HasModuleItem for AnyHasModuleItem {}
8985impl AstNode for AnyHasModuleItem {
8986    #[inline]
8987    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ITEM_LIST | MACRO_ITEMS | SOURCE_FILE) }
8988    #[inline]
8989    fn cast(syntax: SyntaxNode) -> Option<Self> {
8990        Self::can_cast(syntax.kind()).then_some(AnyHasModuleItem { syntax })
8991    }
8992    #[inline]
8993    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8994}
8995impl hash::Hash for AnyHasModuleItem {
8996    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8997}
8998impl Eq for AnyHasModuleItem {}
8999impl PartialEq for AnyHasModuleItem {
9000    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9001}
9002impl Clone for AnyHasModuleItem {
9003    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9004}
9005impl fmt::Debug for AnyHasModuleItem {
9006    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9007        f.debug_struct("AnyHasModuleItem").field("syntax", &self.syntax).finish()
9008    }
9009}
9010impl From<ItemList> for AnyHasModuleItem {
9011    #[inline]
9012    fn from(node: ItemList) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9013}
9014impl From<MacroItems> for AnyHasModuleItem {
9015    #[inline]
9016    fn from(node: MacroItems) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9017}
9018impl From<SourceFile> for AnyHasModuleItem {
9019    #[inline]
9020    fn from(node: SourceFile) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9021}
9022impl ast::HasName for AnyHasName {}
9023impl AstNode for AnyHasName {
9024    #[inline]
9025    fn can_cast(kind: SyntaxKind) -> bool {
9026        matches!(
9027            kind,
9028            ASM_OPERAND_NAMED
9029                | CONST
9030                | CONST_PARAM
9031                | ENUM
9032                | FN
9033                | IDENT_PAT
9034                | MACRO_DEF
9035                | MACRO_RULES
9036                | MODULE
9037                | RECORD_FIELD
9038                | RENAME
9039                | SELF_PARAM
9040                | STATIC
9041                | STRUCT
9042                | TRAIT
9043                | TYPE_ALIAS
9044                | TYPE_PARAM
9045                | UNION
9046                | VARIANT
9047        )
9048    }
9049    #[inline]
9050    fn cast(syntax: SyntaxNode) -> Option<Self> {
9051        Self::can_cast(syntax.kind()).then_some(AnyHasName { syntax })
9052    }
9053    #[inline]
9054    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9055}
9056impl hash::Hash for AnyHasName {
9057    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9058}
9059impl Eq for AnyHasName {}
9060impl PartialEq for AnyHasName {
9061    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9062}
9063impl Clone for AnyHasName {
9064    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9065}
9066impl fmt::Debug for AnyHasName {
9067    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9068        f.debug_struct("AnyHasName").field("syntax", &self.syntax).finish()
9069    }
9070}
9071impl From<AsmOperandNamed> for AnyHasName {
9072    #[inline]
9073    fn from(node: AsmOperandNamed) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9074}
9075impl From<Const> for AnyHasName {
9076    #[inline]
9077    fn from(node: Const) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9078}
9079impl From<ConstParam> for AnyHasName {
9080    #[inline]
9081    fn from(node: ConstParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9082}
9083impl From<Enum> for AnyHasName {
9084    #[inline]
9085    fn from(node: Enum) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9086}
9087impl From<Fn> for AnyHasName {
9088    #[inline]
9089    fn from(node: Fn) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9090}
9091impl From<IdentPat> for AnyHasName {
9092    #[inline]
9093    fn from(node: IdentPat) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9094}
9095impl From<MacroDef> for AnyHasName {
9096    #[inline]
9097    fn from(node: MacroDef) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9098}
9099impl From<MacroRules> for AnyHasName {
9100    #[inline]
9101    fn from(node: MacroRules) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9102}
9103impl From<Module> for AnyHasName {
9104    #[inline]
9105    fn from(node: Module) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9106}
9107impl From<RecordField> for AnyHasName {
9108    #[inline]
9109    fn from(node: RecordField) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9110}
9111impl From<Rename> for AnyHasName {
9112    #[inline]
9113    fn from(node: Rename) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9114}
9115impl From<SelfParam> for AnyHasName {
9116    #[inline]
9117    fn from(node: SelfParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9118}
9119impl From<Static> for AnyHasName {
9120    #[inline]
9121    fn from(node: Static) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9122}
9123impl From<Struct> for AnyHasName {
9124    #[inline]
9125    fn from(node: Struct) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9126}
9127impl From<Trait> for AnyHasName {
9128    #[inline]
9129    fn from(node: Trait) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9130}
9131impl From<TypeAlias> for AnyHasName {
9132    #[inline]
9133    fn from(node: TypeAlias) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9134}
9135impl From<TypeParam> for AnyHasName {
9136    #[inline]
9137    fn from(node: TypeParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9138}
9139impl From<Union> for AnyHasName {
9140    #[inline]
9141    fn from(node: Union) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9142}
9143impl From<Variant> for AnyHasName {
9144    #[inline]
9145    fn from(node: Variant) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9146}
9147impl ast::HasTypeBounds for AnyHasTypeBounds {}
9148impl AstNode for AnyHasTypeBounds {
9149    #[inline]
9150    fn can_cast(kind: SyntaxKind) -> bool {
9151        matches!(
9152            kind,
9153            ASSOC_TYPE_ARG | LIFETIME_PARAM | TRAIT | TYPE_ALIAS | TYPE_PARAM | WHERE_PRED
9154        )
9155    }
9156    #[inline]
9157    fn cast(syntax: SyntaxNode) -> Option<Self> {
9158        Self::can_cast(syntax.kind()).then_some(AnyHasTypeBounds { syntax })
9159    }
9160    #[inline]
9161    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9162}
9163impl hash::Hash for AnyHasTypeBounds {
9164    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9165}
9166impl Eq for AnyHasTypeBounds {}
9167impl PartialEq for AnyHasTypeBounds {
9168    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9169}
9170impl Clone for AnyHasTypeBounds {
9171    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9172}
9173impl fmt::Debug for AnyHasTypeBounds {
9174    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9175        f.debug_struct("AnyHasTypeBounds").field("syntax", &self.syntax).finish()
9176    }
9177}
9178impl From<AssocTypeArg> for AnyHasTypeBounds {
9179    #[inline]
9180    fn from(node: AssocTypeArg) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9181}
9182impl From<LifetimeParam> for AnyHasTypeBounds {
9183    #[inline]
9184    fn from(node: LifetimeParam) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9185}
9186impl From<Trait> for AnyHasTypeBounds {
9187    #[inline]
9188    fn from(node: Trait) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9189}
9190impl From<TypeAlias> for AnyHasTypeBounds {
9191    #[inline]
9192    fn from(node: TypeAlias) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9193}
9194impl From<TypeParam> for AnyHasTypeBounds {
9195    #[inline]
9196    fn from(node: TypeParam) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9197}
9198impl From<WherePred> for AnyHasTypeBounds {
9199    #[inline]
9200    fn from(node: WherePred) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9201}
9202impl ast::HasVisibility for AnyHasVisibility {}
9203impl AstNode for AnyHasVisibility {
9204    #[inline]
9205    fn can_cast(kind: SyntaxKind) -> bool {
9206        matches!(
9207            kind,
9208            CONST
9209                | ENUM
9210                | EXTERN_CRATE
9211                | FN
9212                | IMPL
9213                | MACRO_DEF
9214                | MACRO_RULES
9215                | MODULE
9216                | RECORD_FIELD
9217                | STATIC
9218                | STRUCT
9219                | TRAIT
9220                | TUPLE_FIELD
9221                | TYPE_ALIAS
9222                | UNION
9223                | USE
9224                | VARIANT
9225        )
9226    }
9227    #[inline]
9228    fn cast(syntax: SyntaxNode) -> Option<Self> {
9229        Self::can_cast(syntax.kind()).then_some(AnyHasVisibility { syntax })
9230    }
9231    #[inline]
9232    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9233}
9234impl hash::Hash for AnyHasVisibility {
9235    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9236}
9237impl Eq for AnyHasVisibility {}
9238impl PartialEq for AnyHasVisibility {
9239    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9240}
9241impl Clone for AnyHasVisibility {
9242    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9243}
9244impl fmt::Debug for AnyHasVisibility {
9245    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9246        f.debug_struct("AnyHasVisibility").field("syntax", &self.syntax).finish()
9247    }
9248}
9249impl From<Const> for AnyHasVisibility {
9250    #[inline]
9251    fn from(node: Const) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9252}
9253impl From<Enum> for AnyHasVisibility {
9254    #[inline]
9255    fn from(node: Enum) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9256}
9257impl From<ExternCrate> for AnyHasVisibility {
9258    #[inline]
9259    fn from(node: ExternCrate) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9260}
9261impl From<Fn> for AnyHasVisibility {
9262    #[inline]
9263    fn from(node: Fn) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9264}
9265impl From<Impl> for AnyHasVisibility {
9266    #[inline]
9267    fn from(node: Impl) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9268}
9269impl From<MacroDef> for AnyHasVisibility {
9270    #[inline]
9271    fn from(node: MacroDef) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9272}
9273impl From<MacroRules> for AnyHasVisibility {
9274    #[inline]
9275    fn from(node: MacroRules) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9276}
9277impl From<Module> for AnyHasVisibility {
9278    #[inline]
9279    fn from(node: Module) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9280}
9281impl From<RecordField> for AnyHasVisibility {
9282    #[inline]
9283    fn from(node: RecordField) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9284}
9285impl From<Static> for AnyHasVisibility {
9286    #[inline]
9287    fn from(node: Static) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9288}
9289impl From<Struct> for AnyHasVisibility {
9290    #[inline]
9291    fn from(node: Struct) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9292}
9293impl From<Trait> for AnyHasVisibility {
9294    #[inline]
9295    fn from(node: Trait) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9296}
9297impl From<TupleField> for AnyHasVisibility {
9298    #[inline]
9299    fn from(node: TupleField) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9300}
9301impl From<TypeAlias> for AnyHasVisibility {
9302    #[inline]
9303    fn from(node: TypeAlias) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9304}
9305impl From<Union> for AnyHasVisibility {
9306    #[inline]
9307    fn from(node: Union) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9308}
9309impl From<Use> for AnyHasVisibility {
9310    #[inline]
9311    fn from(node: Use) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9312}
9313impl From<Variant> for AnyHasVisibility {
9314    #[inline]
9315    fn from(node: Variant) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9316}
9317impl std::fmt::Display for Adt {
9318    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9319        std::fmt::Display::fmt(self.syntax(), f)
9320    }
9321}
9322impl std::fmt::Display for AsmOperand {
9323    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9324        std::fmt::Display::fmt(self.syntax(), f)
9325    }
9326}
9327impl std::fmt::Display for AsmPiece {
9328    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9329        std::fmt::Display::fmt(self.syntax(), f)
9330    }
9331}
9332impl std::fmt::Display for AssocItem {
9333    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9334        std::fmt::Display::fmt(self.syntax(), f)
9335    }
9336}
9337impl std::fmt::Display for Expr {
9338    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9339        std::fmt::Display::fmt(self.syntax(), f)
9340    }
9341}
9342impl std::fmt::Display for ExternItem {
9343    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9344        std::fmt::Display::fmt(self.syntax(), f)
9345    }
9346}
9347impl std::fmt::Display for FieldList {
9348    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9349        std::fmt::Display::fmt(self.syntax(), f)
9350    }
9351}
9352impl std::fmt::Display for GenericArg {
9353    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9354        std::fmt::Display::fmt(self.syntax(), f)
9355    }
9356}
9357impl std::fmt::Display for GenericParam {
9358    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9359        std::fmt::Display::fmt(self.syntax(), f)
9360    }
9361}
9362impl std::fmt::Display for Item {
9363    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9364        std::fmt::Display::fmt(self.syntax(), f)
9365    }
9366}
9367impl std::fmt::Display for Pat {
9368    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9369        std::fmt::Display::fmt(self.syntax(), f)
9370    }
9371}
9372impl std::fmt::Display for Stmt {
9373    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9374        std::fmt::Display::fmt(self.syntax(), f)
9375    }
9376}
9377impl std::fmt::Display for Type {
9378    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9379        std::fmt::Display::fmt(self.syntax(), f)
9380    }
9381}
9382impl std::fmt::Display for UseBoundGenericArg {
9383    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9384        std::fmt::Display::fmt(self.syntax(), f)
9385    }
9386}
9387impl std::fmt::Display for VariantDef {
9388    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9389        std::fmt::Display::fmt(self.syntax(), f)
9390    }
9391}
9392impl std::fmt::Display for Abi {
9393    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9394        std::fmt::Display::fmt(self.syntax(), f)
9395    }
9396}
9397impl std::fmt::Display for ArgList {
9398    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9399        std::fmt::Display::fmt(self.syntax(), f)
9400    }
9401}
9402impl std::fmt::Display for ArrayExpr {
9403    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9404        std::fmt::Display::fmt(self.syntax(), f)
9405    }
9406}
9407impl std::fmt::Display for ArrayType {
9408    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9409        std::fmt::Display::fmt(self.syntax(), f)
9410    }
9411}
9412impl std::fmt::Display for AsmClobberAbi {
9413    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9414        std::fmt::Display::fmt(self.syntax(), f)
9415    }
9416}
9417impl std::fmt::Display for AsmConst {
9418    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9419        std::fmt::Display::fmt(self.syntax(), f)
9420    }
9421}
9422impl std::fmt::Display for AsmDirSpec {
9423    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9424        std::fmt::Display::fmt(self.syntax(), f)
9425    }
9426}
9427impl std::fmt::Display for AsmExpr {
9428    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9429        std::fmt::Display::fmt(self.syntax(), f)
9430    }
9431}
9432impl std::fmt::Display for AsmLabel {
9433    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9434        std::fmt::Display::fmt(self.syntax(), f)
9435    }
9436}
9437impl std::fmt::Display for AsmOperandExpr {
9438    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9439        std::fmt::Display::fmt(self.syntax(), f)
9440    }
9441}
9442impl std::fmt::Display for AsmOperandNamed {
9443    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9444        std::fmt::Display::fmt(self.syntax(), f)
9445    }
9446}
9447impl std::fmt::Display for AsmOption {
9448    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9449        std::fmt::Display::fmt(self.syntax(), f)
9450    }
9451}
9452impl std::fmt::Display for AsmOptions {
9453    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9454        std::fmt::Display::fmt(self.syntax(), f)
9455    }
9456}
9457impl std::fmt::Display for AsmRegOperand {
9458    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9459        std::fmt::Display::fmt(self.syntax(), f)
9460    }
9461}
9462impl std::fmt::Display for AsmRegSpec {
9463    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9464        std::fmt::Display::fmt(self.syntax(), f)
9465    }
9466}
9467impl std::fmt::Display for AsmSym {
9468    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9469        std::fmt::Display::fmt(self.syntax(), f)
9470    }
9471}
9472impl std::fmt::Display for AssocItemList {
9473    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9474        std::fmt::Display::fmt(self.syntax(), f)
9475    }
9476}
9477impl std::fmt::Display for AssocTypeArg {
9478    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9479        std::fmt::Display::fmt(self.syntax(), f)
9480    }
9481}
9482impl std::fmt::Display for Attr {
9483    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9484        std::fmt::Display::fmt(self.syntax(), f)
9485    }
9486}
9487impl std::fmt::Display for AwaitExpr {
9488    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9489        std::fmt::Display::fmt(self.syntax(), f)
9490    }
9491}
9492impl std::fmt::Display for BecomeExpr {
9493    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9494        std::fmt::Display::fmt(self.syntax(), f)
9495    }
9496}
9497impl std::fmt::Display for BinExpr {
9498    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9499        std::fmt::Display::fmt(self.syntax(), f)
9500    }
9501}
9502impl std::fmt::Display for BlockExpr {
9503    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9504        std::fmt::Display::fmt(self.syntax(), f)
9505    }
9506}
9507impl std::fmt::Display for BoxPat {
9508    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9509        std::fmt::Display::fmt(self.syntax(), f)
9510    }
9511}
9512impl std::fmt::Display for BreakExpr {
9513    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9514        std::fmt::Display::fmt(self.syntax(), f)
9515    }
9516}
9517impl std::fmt::Display for CallExpr {
9518    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9519        std::fmt::Display::fmt(self.syntax(), f)
9520    }
9521}
9522impl std::fmt::Display for CastExpr {
9523    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9524        std::fmt::Display::fmt(self.syntax(), f)
9525    }
9526}
9527impl std::fmt::Display for ClosureExpr {
9528    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9529        std::fmt::Display::fmt(self.syntax(), f)
9530    }
9531}
9532impl std::fmt::Display for Const {
9533    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9534        std::fmt::Display::fmt(self.syntax(), f)
9535    }
9536}
9537impl std::fmt::Display for ConstArg {
9538    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9539        std::fmt::Display::fmt(self.syntax(), f)
9540    }
9541}
9542impl std::fmt::Display for ConstBlockPat {
9543    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9544        std::fmt::Display::fmt(self.syntax(), f)
9545    }
9546}
9547impl std::fmt::Display for ConstParam {
9548    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9549        std::fmt::Display::fmt(self.syntax(), f)
9550    }
9551}
9552impl std::fmt::Display for ContinueExpr {
9553    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9554        std::fmt::Display::fmt(self.syntax(), f)
9555    }
9556}
9557impl std::fmt::Display for DynTraitType {
9558    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9559        std::fmt::Display::fmt(self.syntax(), f)
9560    }
9561}
9562impl std::fmt::Display for Enum {
9563    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9564        std::fmt::Display::fmt(self.syntax(), f)
9565    }
9566}
9567impl std::fmt::Display for ExprStmt {
9568    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9569        std::fmt::Display::fmt(self.syntax(), f)
9570    }
9571}
9572impl std::fmt::Display for ExternBlock {
9573    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9574        std::fmt::Display::fmt(self.syntax(), f)
9575    }
9576}
9577impl std::fmt::Display for ExternCrate {
9578    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9579        std::fmt::Display::fmt(self.syntax(), f)
9580    }
9581}
9582impl std::fmt::Display for ExternItemList {
9583    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9584        std::fmt::Display::fmt(self.syntax(), f)
9585    }
9586}
9587impl std::fmt::Display for FieldExpr {
9588    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9589        std::fmt::Display::fmt(self.syntax(), f)
9590    }
9591}
9592impl std::fmt::Display for Fn {
9593    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9594        std::fmt::Display::fmt(self.syntax(), f)
9595    }
9596}
9597impl std::fmt::Display for FnPtrType {
9598    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9599        std::fmt::Display::fmt(self.syntax(), f)
9600    }
9601}
9602impl std::fmt::Display for ForBinder {
9603    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9604        std::fmt::Display::fmt(self.syntax(), f)
9605    }
9606}
9607impl std::fmt::Display for ForExpr {
9608    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9609        std::fmt::Display::fmt(self.syntax(), f)
9610    }
9611}
9612impl std::fmt::Display for ForType {
9613    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9614        std::fmt::Display::fmt(self.syntax(), f)
9615    }
9616}
9617impl std::fmt::Display for FormatArgsArg {
9618    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9619        std::fmt::Display::fmt(self.syntax(), f)
9620    }
9621}
9622impl std::fmt::Display for FormatArgsArgName {
9623    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9624        std::fmt::Display::fmt(self.syntax(), f)
9625    }
9626}
9627impl std::fmt::Display for FormatArgsExpr {
9628    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9629        std::fmt::Display::fmt(self.syntax(), f)
9630    }
9631}
9632impl std::fmt::Display for GenericArgList {
9633    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9634        std::fmt::Display::fmt(self.syntax(), f)
9635    }
9636}
9637impl std::fmt::Display for GenericParamList {
9638    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9639        std::fmt::Display::fmt(self.syntax(), f)
9640    }
9641}
9642impl std::fmt::Display for IdentPat {
9643    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9644        std::fmt::Display::fmt(self.syntax(), f)
9645    }
9646}
9647impl std::fmt::Display for IfExpr {
9648    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9649        std::fmt::Display::fmt(self.syntax(), f)
9650    }
9651}
9652impl std::fmt::Display for Impl {
9653    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9654        std::fmt::Display::fmt(self.syntax(), f)
9655    }
9656}
9657impl std::fmt::Display for ImplTraitType {
9658    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9659        std::fmt::Display::fmt(self.syntax(), f)
9660    }
9661}
9662impl std::fmt::Display for IndexExpr {
9663    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9664        std::fmt::Display::fmt(self.syntax(), f)
9665    }
9666}
9667impl std::fmt::Display for InferType {
9668    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9669        std::fmt::Display::fmt(self.syntax(), f)
9670    }
9671}
9672impl std::fmt::Display for ItemList {
9673    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9674        std::fmt::Display::fmt(self.syntax(), f)
9675    }
9676}
9677impl std::fmt::Display for Label {
9678    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9679        std::fmt::Display::fmt(self.syntax(), f)
9680    }
9681}
9682impl std::fmt::Display for LetElse {
9683    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9684        std::fmt::Display::fmt(self.syntax(), f)
9685    }
9686}
9687impl std::fmt::Display for LetExpr {
9688    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9689        std::fmt::Display::fmt(self.syntax(), f)
9690    }
9691}
9692impl std::fmt::Display for LetStmt {
9693    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9694        std::fmt::Display::fmt(self.syntax(), f)
9695    }
9696}
9697impl std::fmt::Display for Lifetime {
9698    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9699        std::fmt::Display::fmt(self.syntax(), f)
9700    }
9701}
9702impl std::fmt::Display for LifetimeArg {
9703    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9704        std::fmt::Display::fmt(self.syntax(), f)
9705    }
9706}
9707impl std::fmt::Display for LifetimeParam {
9708    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9709        std::fmt::Display::fmt(self.syntax(), f)
9710    }
9711}
9712impl std::fmt::Display for Literal {
9713    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9714        std::fmt::Display::fmt(self.syntax(), f)
9715    }
9716}
9717impl std::fmt::Display for LiteralPat {
9718    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9719        std::fmt::Display::fmt(self.syntax(), f)
9720    }
9721}
9722impl std::fmt::Display for LoopExpr {
9723    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9724        std::fmt::Display::fmt(self.syntax(), f)
9725    }
9726}
9727impl std::fmt::Display for MacroCall {
9728    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9729        std::fmt::Display::fmt(self.syntax(), f)
9730    }
9731}
9732impl std::fmt::Display for MacroDef {
9733    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9734        std::fmt::Display::fmt(self.syntax(), f)
9735    }
9736}
9737impl std::fmt::Display for MacroExpr {
9738    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9739        std::fmt::Display::fmt(self.syntax(), f)
9740    }
9741}
9742impl std::fmt::Display for MacroItems {
9743    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9744        std::fmt::Display::fmt(self.syntax(), f)
9745    }
9746}
9747impl std::fmt::Display for MacroPat {
9748    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9749        std::fmt::Display::fmt(self.syntax(), f)
9750    }
9751}
9752impl std::fmt::Display for MacroRules {
9753    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9754        std::fmt::Display::fmt(self.syntax(), f)
9755    }
9756}
9757impl std::fmt::Display for MacroStmts {
9758    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9759        std::fmt::Display::fmt(self.syntax(), f)
9760    }
9761}
9762impl std::fmt::Display for MacroType {
9763    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9764        std::fmt::Display::fmt(self.syntax(), f)
9765    }
9766}
9767impl std::fmt::Display for MatchArm {
9768    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9769        std::fmt::Display::fmt(self.syntax(), f)
9770    }
9771}
9772impl std::fmt::Display for MatchArmList {
9773    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9774        std::fmt::Display::fmt(self.syntax(), f)
9775    }
9776}
9777impl std::fmt::Display for MatchExpr {
9778    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9779        std::fmt::Display::fmt(self.syntax(), f)
9780    }
9781}
9782impl std::fmt::Display for MatchGuard {
9783    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9784        std::fmt::Display::fmt(self.syntax(), f)
9785    }
9786}
9787impl std::fmt::Display for Meta {
9788    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9789        std::fmt::Display::fmt(self.syntax(), f)
9790    }
9791}
9792impl std::fmt::Display for MethodCallExpr {
9793    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9794        std::fmt::Display::fmt(self.syntax(), f)
9795    }
9796}
9797impl std::fmt::Display for Module {
9798    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9799        std::fmt::Display::fmt(self.syntax(), f)
9800    }
9801}
9802impl std::fmt::Display for Name {
9803    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9804        std::fmt::Display::fmt(self.syntax(), f)
9805    }
9806}
9807impl std::fmt::Display for NameRef {
9808    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9809        std::fmt::Display::fmt(self.syntax(), f)
9810    }
9811}
9812impl std::fmt::Display for NeverType {
9813    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9814        std::fmt::Display::fmt(self.syntax(), f)
9815    }
9816}
9817impl std::fmt::Display for OffsetOfExpr {
9818    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9819        std::fmt::Display::fmt(self.syntax(), f)
9820    }
9821}
9822impl std::fmt::Display for OrPat {
9823    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9824        std::fmt::Display::fmt(self.syntax(), f)
9825    }
9826}
9827impl std::fmt::Display for Param {
9828    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9829        std::fmt::Display::fmt(self.syntax(), f)
9830    }
9831}
9832impl std::fmt::Display for ParamList {
9833    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9834        std::fmt::Display::fmt(self.syntax(), f)
9835    }
9836}
9837impl std::fmt::Display for ParenExpr {
9838    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9839        std::fmt::Display::fmt(self.syntax(), f)
9840    }
9841}
9842impl std::fmt::Display for ParenPat {
9843    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9844        std::fmt::Display::fmt(self.syntax(), f)
9845    }
9846}
9847impl std::fmt::Display for ParenType {
9848    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9849        std::fmt::Display::fmt(self.syntax(), f)
9850    }
9851}
9852impl std::fmt::Display for ParenthesizedArgList {
9853    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9854        std::fmt::Display::fmt(self.syntax(), f)
9855    }
9856}
9857impl std::fmt::Display for Path {
9858    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9859        std::fmt::Display::fmt(self.syntax(), f)
9860    }
9861}
9862impl std::fmt::Display for PathExpr {
9863    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9864        std::fmt::Display::fmt(self.syntax(), f)
9865    }
9866}
9867impl std::fmt::Display for PathPat {
9868    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9869        std::fmt::Display::fmt(self.syntax(), f)
9870    }
9871}
9872impl std::fmt::Display for PathSegment {
9873    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9874        std::fmt::Display::fmt(self.syntax(), f)
9875    }
9876}
9877impl std::fmt::Display for PathType {
9878    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9879        std::fmt::Display::fmt(self.syntax(), f)
9880    }
9881}
9882impl std::fmt::Display for PrefixExpr {
9883    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9884        std::fmt::Display::fmt(self.syntax(), f)
9885    }
9886}
9887impl std::fmt::Display for PtrType {
9888    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9889        std::fmt::Display::fmt(self.syntax(), f)
9890    }
9891}
9892impl std::fmt::Display for RangeExpr {
9893    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9894        std::fmt::Display::fmt(self.syntax(), f)
9895    }
9896}
9897impl std::fmt::Display for RangePat {
9898    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9899        std::fmt::Display::fmt(self.syntax(), f)
9900    }
9901}
9902impl std::fmt::Display for RecordExpr {
9903    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9904        std::fmt::Display::fmt(self.syntax(), f)
9905    }
9906}
9907impl std::fmt::Display for RecordExprField {
9908    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9909        std::fmt::Display::fmt(self.syntax(), f)
9910    }
9911}
9912impl std::fmt::Display for RecordExprFieldList {
9913    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9914        std::fmt::Display::fmt(self.syntax(), f)
9915    }
9916}
9917impl std::fmt::Display for RecordField {
9918    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9919        std::fmt::Display::fmt(self.syntax(), f)
9920    }
9921}
9922impl std::fmt::Display for RecordFieldList {
9923    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9924        std::fmt::Display::fmt(self.syntax(), f)
9925    }
9926}
9927impl std::fmt::Display for RecordPat {
9928    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9929        std::fmt::Display::fmt(self.syntax(), f)
9930    }
9931}
9932impl std::fmt::Display for RecordPatField {
9933    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9934        std::fmt::Display::fmt(self.syntax(), f)
9935    }
9936}
9937impl std::fmt::Display for RecordPatFieldList {
9938    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9939        std::fmt::Display::fmt(self.syntax(), f)
9940    }
9941}
9942impl std::fmt::Display for RefExpr {
9943    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9944        std::fmt::Display::fmt(self.syntax(), f)
9945    }
9946}
9947impl std::fmt::Display for RefPat {
9948    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9949        std::fmt::Display::fmt(self.syntax(), f)
9950    }
9951}
9952impl std::fmt::Display for RefType {
9953    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9954        std::fmt::Display::fmt(self.syntax(), f)
9955    }
9956}
9957impl std::fmt::Display for Rename {
9958    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9959        std::fmt::Display::fmt(self.syntax(), f)
9960    }
9961}
9962impl std::fmt::Display for RestPat {
9963    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9964        std::fmt::Display::fmt(self.syntax(), f)
9965    }
9966}
9967impl std::fmt::Display for RetType {
9968    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9969        std::fmt::Display::fmt(self.syntax(), f)
9970    }
9971}
9972impl std::fmt::Display for ReturnExpr {
9973    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9974        std::fmt::Display::fmt(self.syntax(), f)
9975    }
9976}
9977impl std::fmt::Display for ReturnTypeSyntax {
9978    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9979        std::fmt::Display::fmt(self.syntax(), f)
9980    }
9981}
9982impl std::fmt::Display for SelfParam {
9983    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9984        std::fmt::Display::fmt(self.syntax(), f)
9985    }
9986}
9987impl std::fmt::Display for SlicePat {
9988    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9989        std::fmt::Display::fmt(self.syntax(), f)
9990    }
9991}
9992impl std::fmt::Display for SliceType {
9993    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9994        std::fmt::Display::fmt(self.syntax(), f)
9995    }
9996}
9997impl std::fmt::Display for SourceFile {
9998    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9999        std::fmt::Display::fmt(self.syntax(), f)
10000    }
10001}
10002impl std::fmt::Display for Static {
10003    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10004        std::fmt::Display::fmt(self.syntax(), f)
10005    }
10006}
10007impl std::fmt::Display for StmtList {
10008    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10009        std::fmt::Display::fmt(self.syntax(), f)
10010    }
10011}
10012impl std::fmt::Display for Struct {
10013    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10014        std::fmt::Display::fmt(self.syntax(), f)
10015    }
10016}
10017impl std::fmt::Display for TokenTree {
10018    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10019        std::fmt::Display::fmt(self.syntax(), f)
10020    }
10021}
10022impl std::fmt::Display for Trait {
10023    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10024        std::fmt::Display::fmt(self.syntax(), f)
10025    }
10026}
10027impl std::fmt::Display for TryBlockModifier {
10028    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10029        std::fmt::Display::fmt(self.syntax(), f)
10030    }
10031}
10032impl std::fmt::Display for TryExpr {
10033    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10034        std::fmt::Display::fmt(self.syntax(), f)
10035    }
10036}
10037impl std::fmt::Display for TupleExpr {
10038    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10039        std::fmt::Display::fmt(self.syntax(), f)
10040    }
10041}
10042impl std::fmt::Display for TupleField {
10043    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10044        std::fmt::Display::fmt(self.syntax(), f)
10045    }
10046}
10047impl std::fmt::Display for TupleFieldList {
10048    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10049        std::fmt::Display::fmt(self.syntax(), f)
10050    }
10051}
10052impl std::fmt::Display for TuplePat {
10053    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10054        std::fmt::Display::fmt(self.syntax(), f)
10055    }
10056}
10057impl std::fmt::Display for TupleStructPat {
10058    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10059        std::fmt::Display::fmt(self.syntax(), f)
10060    }
10061}
10062impl std::fmt::Display for TupleType {
10063    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10064        std::fmt::Display::fmt(self.syntax(), f)
10065    }
10066}
10067impl std::fmt::Display for TypeAlias {
10068    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10069        std::fmt::Display::fmt(self.syntax(), f)
10070    }
10071}
10072impl std::fmt::Display for TypeAnchor {
10073    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10074        std::fmt::Display::fmt(self.syntax(), f)
10075    }
10076}
10077impl std::fmt::Display for TypeArg {
10078    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10079        std::fmt::Display::fmt(self.syntax(), f)
10080    }
10081}
10082impl std::fmt::Display for TypeBound {
10083    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10084        std::fmt::Display::fmt(self.syntax(), f)
10085    }
10086}
10087impl std::fmt::Display for TypeBoundList {
10088    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10089        std::fmt::Display::fmt(self.syntax(), f)
10090    }
10091}
10092impl std::fmt::Display for TypeParam {
10093    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10094        std::fmt::Display::fmt(self.syntax(), f)
10095    }
10096}
10097impl std::fmt::Display for UnderscoreExpr {
10098    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10099        std::fmt::Display::fmt(self.syntax(), f)
10100    }
10101}
10102impl std::fmt::Display for Union {
10103    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10104        std::fmt::Display::fmt(self.syntax(), f)
10105    }
10106}
10107impl std::fmt::Display for Use {
10108    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10109        std::fmt::Display::fmt(self.syntax(), f)
10110    }
10111}
10112impl std::fmt::Display for UseBoundGenericArgs {
10113    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10114        std::fmt::Display::fmt(self.syntax(), f)
10115    }
10116}
10117impl std::fmt::Display for UseTree {
10118    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10119        std::fmt::Display::fmt(self.syntax(), f)
10120    }
10121}
10122impl std::fmt::Display for UseTreeList {
10123    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10124        std::fmt::Display::fmt(self.syntax(), f)
10125    }
10126}
10127impl std::fmt::Display for Variant {
10128    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10129        std::fmt::Display::fmt(self.syntax(), f)
10130    }
10131}
10132impl std::fmt::Display for VariantList {
10133    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10134        std::fmt::Display::fmt(self.syntax(), f)
10135    }
10136}
10137impl std::fmt::Display for Visibility {
10138    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10139        std::fmt::Display::fmt(self.syntax(), f)
10140    }
10141}
10142impl std::fmt::Display for WhereClause {
10143    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10144        std::fmt::Display::fmt(self.syntax(), f)
10145    }
10146}
10147impl std::fmt::Display for WherePred {
10148    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10149        std::fmt::Display::fmt(self.syntax(), f)
10150    }
10151}
10152impl std::fmt::Display for WhileExpr {
10153    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10154        std::fmt::Display::fmt(self.syntax(), f)
10155    }
10156}
10157impl std::fmt::Display for WildcardPat {
10158    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10159        std::fmt::Display::fmt(self.syntax(), f)
10160    }
10161}
10162impl std::fmt::Display for YeetExpr {
10163    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10164        std::fmt::Display::fmt(self.syntax(), f)
10165    }
10166}
10167impl std::fmt::Display for YieldExpr {
10168    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10169        std::fmt::Display::fmt(self.syntax(), f)
10170    }
10171}