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    ast::{self, support, AstChildren, AstNode},
6    SyntaxKind::{self, *},
7    SyntaxNode, SyntaxToken, T,
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 async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
327    #[inline]
328    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
329    #[inline]
330    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
331    #[inline]
332    pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
333    #[inline]
334    pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
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 ast::HasName for FormatArgsArg {}
643impl FormatArgsArg {
644    #[inline]
645    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
646    #[inline]
647    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
648}
649pub struct FormatArgsExpr {
650    pub(crate) syntax: SyntaxNode,
651}
652impl ast::HasAttrs for FormatArgsExpr {}
653impl FormatArgsExpr {
654    #[inline]
655    pub fn template(&self) -> Option<Expr> { support::child(&self.syntax) }
656    #[inline]
657    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
658    #[inline]
659    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
660    #[inline]
661    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
662    #[inline]
663    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
664    #[inline]
665    pub fn builtin_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![builtin]) }
666    #[inline]
667    pub fn format_args_token(&self) -> Option<SyntaxToken> {
668        support::token(&self.syntax, T![format_args])
669    }
670}
671pub struct GenericArgList {
672    pub(crate) syntax: SyntaxNode,
673}
674impl GenericArgList {
675    #[inline]
676    pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) }
677    #[inline]
678    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
679    #[inline]
680    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
681    #[inline]
682    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
683}
684pub struct GenericParamList {
685    pub(crate) syntax: SyntaxNode,
686}
687impl GenericParamList {
688    #[inline]
689    pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
690    #[inline]
691    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
692    #[inline]
693    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
694}
695pub struct IdentPat {
696    pub(crate) syntax: SyntaxNode,
697}
698impl ast::HasAttrs for IdentPat {}
699impl ast::HasName for IdentPat {}
700impl IdentPat {
701    #[inline]
702    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
703    #[inline]
704    pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) }
705    #[inline]
706    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
707    #[inline]
708    pub fn ref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ref]) }
709}
710pub struct IfExpr {
711    pub(crate) syntax: SyntaxNode,
712}
713impl ast::HasAttrs for IfExpr {}
714impl IfExpr {
715    #[inline]
716    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
717    #[inline]
718    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
719}
720pub struct Impl {
721    pub(crate) syntax: SyntaxNode,
722}
723impl ast::HasAttrs for Impl {}
724impl ast::HasDocComments for Impl {}
725impl ast::HasGenericParams for Impl {}
726impl ast::HasVisibility for Impl {}
727impl Impl {
728    #[inline]
729    pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
730    #[inline]
731    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
732    #[inline]
733    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
734    #[inline]
735    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
736    #[inline]
737    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
738    #[inline]
739    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
740    #[inline]
741    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
742}
743pub struct ImplTraitType {
744    pub(crate) syntax: SyntaxNode,
745}
746impl ImplTraitType {
747    #[inline]
748    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
749    #[inline]
750    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
751}
752pub struct IndexExpr {
753    pub(crate) syntax: SyntaxNode,
754}
755impl ast::HasAttrs for IndexExpr {}
756impl IndexExpr {
757    #[inline]
758    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
759    #[inline]
760    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
761}
762pub struct InferType {
763    pub(crate) syntax: SyntaxNode,
764}
765impl InferType {
766    #[inline]
767    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
768}
769pub struct ItemList {
770    pub(crate) syntax: SyntaxNode,
771}
772impl ast::HasAttrs for ItemList {}
773impl ast::HasModuleItem for ItemList {}
774impl ItemList {
775    #[inline]
776    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
777    #[inline]
778    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
779}
780pub struct Label {
781    pub(crate) syntax: SyntaxNode,
782}
783impl Label {
784    #[inline]
785    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
786    #[inline]
787    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
788}
789pub struct LetElse {
790    pub(crate) syntax: SyntaxNode,
791}
792impl LetElse {
793    #[inline]
794    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
795    #[inline]
796    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
797}
798pub struct LetExpr {
799    pub(crate) syntax: SyntaxNode,
800}
801impl ast::HasAttrs for LetExpr {}
802impl LetExpr {
803    #[inline]
804    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
805    #[inline]
806    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
807    #[inline]
808    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
809    #[inline]
810    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
811}
812pub struct LetStmt {
813    pub(crate) syntax: SyntaxNode,
814}
815impl ast::HasAttrs for LetStmt {}
816impl LetStmt {
817    #[inline]
818    pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
819    #[inline]
820    pub fn let_else(&self) -> Option<LetElse> { support::child(&self.syntax) }
821    #[inline]
822    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
823    #[inline]
824    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
825    #[inline]
826    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
827    #[inline]
828    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
829    #[inline]
830    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
831    #[inline]
832    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
833    #[inline]
834    pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
835}
836pub struct Lifetime {
837    pub(crate) syntax: SyntaxNode,
838}
839impl Lifetime {
840    #[inline]
841    pub fn lifetime_ident_token(&self) -> Option<SyntaxToken> {
842        support::token(&self.syntax, T![lifetime_ident])
843    }
844}
845pub struct LifetimeArg {
846    pub(crate) syntax: SyntaxNode,
847}
848impl LifetimeArg {
849    #[inline]
850    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
851}
852pub struct LifetimeParam {
853    pub(crate) syntax: SyntaxNode,
854}
855impl ast::HasAttrs for LifetimeParam {}
856impl ast::HasTypeBounds for LifetimeParam {}
857impl LifetimeParam {
858    #[inline]
859    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
860}
861pub struct Literal {
862    pub(crate) syntax: SyntaxNode,
863}
864impl ast::HasAttrs for Literal {}
865impl Literal {}
866pub struct LiteralPat {
867    pub(crate) syntax: SyntaxNode,
868}
869impl LiteralPat {
870    #[inline]
871    pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
872    #[inline]
873    pub fn minus_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![-]) }
874}
875pub struct LoopExpr {
876    pub(crate) syntax: SyntaxNode,
877}
878impl ast::HasAttrs for LoopExpr {}
879impl ast::HasLoopBody for LoopExpr {}
880impl LoopExpr {
881    #[inline]
882    pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
883}
884pub struct MacroCall {
885    pub(crate) syntax: SyntaxNode,
886}
887impl ast::HasAttrs for MacroCall {}
888impl ast::HasDocComments for MacroCall {}
889impl MacroCall {
890    #[inline]
891    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
892    #[inline]
893    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
894    #[inline]
895    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
896    #[inline]
897    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
898}
899pub struct MacroDef {
900    pub(crate) syntax: SyntaxNode,
901}
902impl ast::HasAttrs for MacroDef {}
903impl ast::HasDocComments for MacroDef {}
904impl ast::HasName for MacroDef {}
905impl ast::HasVisibility for MacroDef {}
906impl MacroDef {
907    #[inline]
908    pub fn macro_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![macro]) }
909}
910pub struct MacroExpr {
911    pub(crate) syntax: SyntaxNode,
912}
913impl MacroExpr {
914    #[inline]
915    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
916}
917pub struct MacroItems {
918    pub(crate) syntax: SyntaxNode,
919}
920impl ast::HasModuleItem for MacroItems {}
921impl MacroItems {}
922pub struct MacroPat {
923    pub(crate) syntax: SyntaxNode,
924}
925impl MacroPat {
926    #[inline]
927    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
928}
929pub struct MacroRules {
930    pub(crate) syntax: SyntaxNode,
931}
932impl ast::HasAttrs for MacroRules {}
933impl ast::HasDocComments for MacroRules {}
934impl ast::HasName for MacroRules {}
935impl ast::HasVisibility for MacroRules {}
936impl MacroRules {
937    #[inline]
938    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
939    #[inline]
940    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
941    #[inline]
942    pub fn macro_rules_token(&self) -> Option<SyntaxToken> {
943        support::token(&self.syntax, T![macro_rules])
944    }
945}
946pub struct MacroStmts {
947    pub(crate) syntax: SyntaxNode,
948}
949impl MacroStmts {
950    #[inline]
951    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
952    #[inline]
953    pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
954}
955pub struct MacroType {
956    pub(crate) syntax: SyntaxNode,
957}
958impl MacroType {
959    #[inline]
960    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
961}
962pub struct MatchArm {
963    pub(crate) syntax: SyntaxNode,
964}
965impl ast::HasAttrs for MatchArm {}
966impl MatchArm {
967    #[inline]
968    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
969    #[inline]
970    pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
971    #[inline]
972    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
973    #[inline]
974    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
975    #[inline]
976    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
977}
978pub struct MatchArmList {
979    pub(crate) syntax: SyntaxNode,
980}
981impl ast::HasAttrs for MatchArmList {}
982impl MatchArmList {
983    #[inline]
984    pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
985    #[inline]
986    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
987    #[inline]
988    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
989}
990pub struct MatchExpr {
991    pub(crate) syntax: SyntaxNode,
992}
993impl ast::HasAttrs for MatchExpr {}
994impl MatchExpr {
995    #[inline]
996    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
997    #[inline]
998    pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
999    #[inline]
1000    pub fn match_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![match]) }
1001}
1002pub struct MatchGuard {
1003    pub(crate) syntax: SyntaxNode,
1004}
1005impl MatchGuard {
1006    #[inline]
1007    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
1008}
1009pub struct Meta {
1010    pub(crate) syntax: SyntaxNode,
1011}
1012impl Meta {
1013    #[inline]
1014    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1015    #[inline]
1016    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1017    #[inline]
1018    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1019    #[inline]
1020    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1021    #[inline]
1022    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1023    #[inline]
1024    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1025    #[inline]
1026    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1027}
1028pub struct MethodCallExpr {
1029    pub(crate) syntax: SyntaxNode,
1030}
1031impl ast::HasArgList for MethodCallExpr {}
1032impl ast::HasAttrs for MethodCallExpr {}
1033impl ast::HasGenericArgs for MethodCallExpr {}
1034impl MethodCallExpr {
1035    #[inline]
1036    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1037    #[inline]
1038    pub fn receiver(&self) -> Option<Expr> { support::child(&self.syntax) }
1039    #[inline]
1040    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1041}
1042pub struct Module {
1043    pub(crate) syntax: SyntaxNode,
1044}
1045impl ast::HasAttrs for Module {}
1046impl ast::HasDocComments for Module {}
1047impl ast::HasName for Module {}
1048impl ast::HasVisibility for Module {}
1049impl Module {
1050    #[inline]
1051    pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
1052    #[inline]
1053    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1054    #[inline]
1055    pub fn mod_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mod]) }
1056}
1057pub struct Name {
1058    pub(crate) syntax: SyntaxNode,
1059}
1060impl Name {
1061    #[inline]
1062    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1063    #[inline]
1064    pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1065}
1066pub struct NameRef {
1067    pub(crate) syntax: SyntaxNode,
1068}
1069impl NameRef {
1070    #[inline]
1071    pub fn Self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![Self]) }
1072    #[inline]
1073    pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
1074    #[inline]
1075    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1076    #[inline]
1077    pub fn int_number_token(&self) -> Option<SyntaxToken> {
1078        support::token(&self.syntax, T![int_number])
1079    }
1080    #[inline]
1081    pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1082    #[inline]
1083    pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
1084}
1085pub struct NeverType {
1086    pub(crate) syntax: SyntaxNode,
1087}
1088impl NeverType {
1089    #[inline]
1090    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1091}
1092pub struct OffsetOfExpr {
1093    pub(crate) syntax: SyntaxNode,
1094}
1095impl ast::HasAttrs for OffsetOfExpr {}
1096impl OffsetOfExpr {
1097    #[inline]
1098    pub fn fields(&self) -> AstChildren<NameRef> { support::children(&self.syntax) }
1099    #[inline]
1100    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1101    #[inline]
1102    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
1103    #[inline]
1104    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1105    #[inline]
1106    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1107    #[inline]
1108    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1109    #[inline]
1110    pub fn builtin_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![builtin]) }
1111    #[inline]
1112    pub fn offset_of_token(&self) -> Option<SyntaxToken> {
1113        support::token(&self.syntax, T![offset_of])
1114    }
1115}
1116pub struct OrPat {
1117    pub(crate) syntax: SyntaxNode,
1118}
1119impl OrPat {
1120    #[inline]
1121    pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1122    #[inline]
1123    pub fn pipe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![|]) }
1124}
1125pub struct Param {
1126    pub(crate) syntax: SyntaxNode,
1127}
1128impl ast::HasAttrs for Param {}
1129impl Param {
1130    #[inline]
1131    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1132    #[inline]
1133    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1134    #[inline]
1135    pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
1136    #[inline]
1137    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1138}
1139pub struct ParamList {
1140    pub(crate) syntax: SyntaxNode,
1141}
1142impl ParamList {
1143    #[inline]
1144    pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
1145    #[inline]
1146    pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
1147    #[inline]
1148    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1149    #[inline]
1150    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1151    #[inline]
1152    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1153    #[inline]
1154    pub fn pipe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![|]) }
1155}
1156pub struct ParenExpr {
1157    pub(crate) syntax: SyntaxNode,
1158}
1159impl ast::HasAttrs for ParenExpr {}
1160impl ParenExpr {
1161    #[inline]
1162    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1163    #[inline]
1164    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1165    #[inline]
1166    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1167}
1168pub struct ParenPat {
1169    pub(crate) syntax: SyntaxNode,
1170}
1171impl ParenPat {
1172    #[inline]
1173    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1174    #[inline]
1175    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1176    #[inline]
1177    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1178}
1179pub struct ParenType {
1180    pub(crate) syntax: SyntaxNode,
1181}
1182impl ParenType {
1183    #[inline]
1184    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1185    #[inline]
1186    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1187    #[inline]
1188    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1189}
1190pub struct ParenthesizedArgList {
1191    pub(crate) syntax: SyntaxNode,
1192}
1193impl ParenthesizedArgList {
1194    #[inline]
1195    pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) }
1196    #[inline]
1197    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1198    #[inline]
1199    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1200    #[inline]
1201    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1202}
1203pub struct Path {
1204    pub(crate) syntax: SyntaxNode,
1205}
1206impl Path {
1207    #[inline]
1208    pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) }
1209    #[inline]
1210    pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) }
1211    #[inline]
1212    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1213}
1214pub struct PathExpr {
1215    pub(crate) syntax: SyntaxNode,
1216}
1217impl ast::HasAttrs for PathExpr {}
1218impl PathExpr {
1219    #[inline]
1220    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1221}
1222pub struct PathPat {
1223    pub(crate) syntax: SyntaxNode,
1224}
1225impl PathPat {
1226    #[inline]
1227    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1228}
1229pub struct PathSegment {
1230    pub(crate) syntax: SyntaxNode,
1231}
1232impl ast::HasGenericArgs for PathSegment {}
1233impl PathSegment {
1234    #[inline]
1235    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1236    #[inline]
1237    pub fn parenthesized_arg_list(&self) -> Option<ParenthesizedArgList> {
1238        support::child(&self.syntax)
1239    }
1240    #[inline]
1241    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
1242    #[inline]
1243    pub fn return_type_syntax(&self) -> Option<ReturnTypeSyntax> { support::child(&self.syntax) }
1244    #[inline]
1245    pub fn type_anchor(&self) -> Option<TypeAnchor> { support::child(&self.syntax) }
1246    #[inline]
1247    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1248}
1249pub struct PathType {
1250    pub(crate) syntax: SyntaxNode,
1251}
1252impl PathType {
1253    #[inline]
1254    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1255}
1256pub struct PrefixExpr {
1257    pub(crate) syntax: SyntaxNode,
1258}
1259impl ast::HasAttrs for PrefixExpr {}
1260impl PrefixExpr {
1261    #[inline]
1262    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1263}
1264pub struct PtrType {
1265    pub(crate) syntax: SyntaxNode,
1266}
1267impl PtrType {
1268    #[inline]
1269    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1270    #[inline]
1271    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
1272    #[inline]
1273    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1274    #[inline]
1275    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1276}
1277pub struct RangeExpr {
1278    pub(crate) syntax: SyntaxNode,
1279}
1280impl ast::HasAttrs for RangeExpr {}
1281impl RangeExpr {}
1282pub struct RangePat {
1283    pub(crate) syntax: SyntaxNode,
1284}
1285impl RangePat {}
1286pub struct RecordExpr {
1287    pub(crate) syntax: SyntaxNode,
1288}
1289impl RecordExpr {
1290    #[inline]
1291    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1292    #[inline]
1293    pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> {
1294        support::child(&self.syntax)
1295    }
1296}
1297pub struct RecordExprField {
1298    pub(crate) syntax: SyntaxNode,
1299}
1300impl ast::HasAttrs for RecordExprField {}
1301impl RecordExprField {
1302    #[inline]
1303    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1304    #[inline]
1305    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1306    #[inline]
1307    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1308}
1309pub struct RecordExprFieldList {
1310    pub(crate) syntax: SyntaxNode,
1311}
1312impl ast::HasAttrs for RecordExprFieldList {}
1313impl RecordExprFieldList {
1314    #[inline]
1315    pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) }
1316    #[inline]
1317    pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
1318    #[inline]
1319    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1320    #[inline]
1321    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1322    #[inline]
1323    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1324}
1325pub struct RecordField {
1326    pub(crate) syntax: SyntaxNode,
1327}
1328impl ast::HasAttrs for RecordField {}
1329impl ast::HasDocComments for RecordField {}
1330impl ast::HasName for RecordField {}
1331impl ast::HasVisibility for RecordField {}
1332impl RecordField {
1333    #[inline]
1334    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1335    #[inline]
1336    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1337    #[inline]
1338    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1339    #[inline]
1340    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1341    #[inline]
1342    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1343}
1344pub struct RecordFieldList {
1345    pub(crate) syntax: SyntaxNode,
1346}
1347impl RecordFieldList {
1348    #[inline]
1349    pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) }
1350    #[inline]
1351    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1352    #[inline]
1353    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1354}
1355pub struct RecordPat {
1356    pub(crate) syntax: SyntaxNode,
1357}
1358impl RecordPat {
1359    #[inline]
1360    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1361    #[inline]
1362    pub fn record_pat_field_list(&self) -> Option<RecordPatFieldList> {
1363        support::child(&self.syntax)
1364    }
1365}
1366pub struct RecordPatField {
1367    pub(crate) syntax: SyntaxNode,
1368}
1369impl ast::HasAttrs for RecordPatField {}
1370impl RecordPatField {
1371    #[inline]
1372    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1373    #[inline]
1374    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1375    #[inline]
1376    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1377}
1378pub struct RecordPatFieldList {
1379    pub(crate) syntax: SyntaxNode,
1380}
1381impl RecordPatFieldList {
1382    #[inline]
1383    pub fn fields(&self) -> AstChildren<RecordPatField> { support::children(&self.syntax) }
1384    #[inline]
1385    pub fn rest_pat(&self) -> Option<RestPat> { support::child(&self.syntax) }
1386    #[inline]
1387    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1388    #[inline]
1389    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1390}
1391pub struct RefExpr {
1392    pub(crate) syntax: SyntaxNode,
1393}
1394impl ast::HasAttrs for RefExpr {}
1395impl RefExpr {
1396    #[inline]
1397    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1398    #[inline]
1399    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1400    #[inline]
1401    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1402    #[inline]
1403    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1404    #[inline]
1405    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
1406}
1407pub struct RefPat {
1408    pub(crate) syntax: SyntaxNode,
1409}
1410impl RefPat {
1411    #[inline]
1412    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1413    #[inline]
1414    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1415    #[inline]
1416    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1417}
1418pub struct RefType {
1419    pub(crate) syntax: SyntaxNode,
1420}
1421impl RefType {
1422    #[inline]
1423    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1424    #[inline]
1425    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1426    #[inline]
1427    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1428    #[inline]
1429    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1430}
1431pub struct Rename {
1432    pub(crate) syntax: SyntaxNode,
1433}
1434impl ast::HasName for Rename {}
1435impl Rename {
1436    #[inline]
1437    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1438    #[inline]
1439    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1440}
1441pub struct RestPat {
1442    pub(crate) syntax: SyntaxNode,
1443}
1444impl ast::HasAttrs for RestPat {}
1445impl RestPat {
1446    #[inline]
1447    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1448}
1449pub struct RetType {
1450    pub(crate) syntax: SyntaxNode,
1451}
1452impl RetType {
1453    #[inline]
1454    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1455    #[inline]
1456    pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
1457}
1458pub struct ReturnExpr {
1459    pub(crate) syntax: SyntaxNode,
1460}
1461impl ast::HasAttrs for ReturnExpr {}
1462impl ReturnExpr {
1463    #[inline]
1464    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1465    #[inline]
1466    pub fn return_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![return]) }
1467}
1468pub struct ReturnTypeSyntax {
1469    pub(crate) syntax: SyntaxNode,
1470}
1471impl ReturnTypeSyntax {
1472    #[inline]
1473    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1474    #[inline]
1475    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1476    #[inline]
1477    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1478}
1479pub struct SelfParam {
1480    pub(crate) syntax: SyntaxNode,
1481}
1482impl ast::HasAttrs for SelfParam {}
1483impl ast::HasName for SelfParam {}
1484impl SelfParam {
1485    #[inline]
1486    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1487    #[inline]
1488    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1489    #[inline]
1490    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1491    #[inline]
1492    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1493    #[inline]
1494    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1495}
1496pub struct SlicePat {
1497    pub(crate) syntax: SyntaxNode,
1498}
1499impl SlicePat {
1500    #[inline]
1501    pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1502    #[inline]
1503    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1504    #[inline]
1505    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1506}
1507pub struct SliceType {
1508    pub(crate) syntax: SyntaxNode,
1509}
1510impl SliceType {
1511    #[inline]
1512    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1513    #[inline]
1514    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1515    #[inline]
1516    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1517}
1518pub struct SourceFile {
1519    pub(crate) syntax: SyntaxNode,
1520}
1521impl ast::HasAttrs for SourceFile {}
1522impl ast::HasDocComments for SourceFile {}
1523impl ast::HasModuleItem for SourceFile {}
1524impl SourceFile {
1525    #[inline]
1526    pub fn frontmatter_token(&self) -> Option<SyntaxToken> {
1527        support::token(&self.syntax, T![frontmatter])
1528    }
1529    #[inline]
1530    pub fn shebang_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![shebang]) }
1531}
1532pub struct Static {
1533    pub(crate) syntax: SyntaxNode,
1534}
1535impl ast::HasAttrs for Static {}
1536impl ast::HasDocComments for Static {}
1537impl ast::HasName for Static {}
1538impl ast::HasVisibility for Static {}
1539impl Static {
1540    #[inline]
1541    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1542    #[inline]
1543    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1544    #[inline]
1545    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1546    #[inline]
1547    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1548    #[inline]
1549    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1550    #[inline]
1551    pub fn safe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![safe]) }
1552    #[inline]
1553    pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
1554    #[inline]
1555    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1556}
1557pub struct StmtList {
1558    pub(crate) syntax: SyntaxNode,
1559}
1560impl ast::HasAttrs for StmtList {}
1561impl StmtList {
1562    #[inline]
1563    pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
1564    #[inline]
1565    pub fn tail_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1566    #[inline]
1567    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1568    #[inline]
1569    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1570}
1571pub struct Struct {
1572    pub(crate) syntax: SyntaxNode,
1573}
1574impl ast::HasAttrs for Struct {}
1575impl ast::HasDocComments for Struct {}
1576impl ast::HasGenericParams for Struct {}
1577impl ast::HasName for Struct {}
1578impl ast::HasVisibility for Struct {}
1579impl Struct {
1580    #[inline]
1581    pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
1582    #[inline]
1583    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1584    #[inline]
1585    pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) }
1586}
1587pub struct TokenTree {
1588    pub(crate) syntax: SyntaxNode,
1589}
1590impl TokenTree {
1591    #[inline]
1592    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1593    #[inline]
1594    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1595    #[inline]
1596    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1597    #[inline]
1598    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1599    #[inline]
1600    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1601    #[inline]
1602    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1603}
1604pub struct Trait {
1605    pub(crate) syntax: SyntaxNode,
1606}
1607impl ast::HasAttrs for Trait {}
1608impl ast::HasDocComments for Trait {}
1609impl ast::HasGenericParams for Trait {}
1610impl ast::HasName for Trait {}
1611impl ast::HasTypeBounds for Trait {}
1612impl ast::HasVisibility for Trait {}
1613impl Trait {
1614    #[inline]
1615    pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
1616    #[inline]
1617    pub fn auto_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![auto]) }
1618    #[inline]
1619    pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) }
1620    #[inline]
1621    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1622}
1623pub struct TraitAlias {
1624    pub(crate) syntax: SyntaxNode,
1625}
1626impl ast::HasAttrs for TraitAlias {}
1627impl ast::HasDocComments for TraitAlias {}
1628impl ast::HasGenericParams for TraitAlias {}
1629impl ast::HasName for TraitAlias {}
1630impl ast::HasVisibility for TraitAlias {}
1631impl TraitAlias {
1632    #[inline]
1633    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
1634    #[inline]
1635    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1636    #[inline]
1637    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1638    #[inline]
1639    pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) }
1640}
1641pub struct TryExpr {
1642    pub(crate) syntax: SyntaxNode,
1643}
1644impl ast::HasAttrs for TryExpr {}
1645impl TryExpr {
1646    #[inline]
1647    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1648    #[inline]
1649    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
1650}
1651pub struct TupleExpr {
1652    pub(crate) syntax: SyntaxNode,
1653}
1654impl ast::HasAttrs for TupleExpr {}
1655impl TupleExpr {
1656    #[inline]
1657    pub fn fields(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
1658    #[inline]
1659    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1660    #[inline]
1661    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1662}
1663pub struct TupleField {
1664    pub(crate) syntax: SyntaxNode,
1665}
1666impl ast::HasAttrs for TupleField {}
1667impl ast::HasDocComments for TupleField {}
1668impl ast::HasVisibility for TupleField {}
1669impl TupleField {
1670    #[inline]
1671    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1672}
1673pub struct TupleFieldList {
1674    pub(crate) syntax: SyntaxNode,
1675}
1676impl TupleFieldList {
1677    #[inline]
1678    pub fn fields(&self) -> AstChildren<TupleField> { support::children(&self.syntax) }
1679    #[inline]
1680    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1681    #[inline]
1682    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1683}
1684pub struct TuplePat {
1685    pub(crate) syntax: SyntaxNode,
1686}
1687impl TuplePat {
1688    #[inline]
1689    pub fn fields(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1690    #[inline]
1691    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1692    #[inline]
1693    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1694}
1695pub struct TupleStructPat {
1696    pub(crate) syntax: SyntaxNode,
1697}
1698impl TupleStructPat {
1699    #[inline]
1700    pub fn fields(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1701    #[inline]
1702    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1703    #[inline]
1704    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1705    #[inline]
1706    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1707}
1708pub struct TupleType {
1709    pub(crate) syntax: SyntaxNode,
1710}
1711impl TupleType {
1712    #[inline]
1713    pub fn fields(&self) -> AstChildren<Type> { support::children(&self.syntax) }
1714    #[inline]
1715    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1716    #[inline]
1717    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1718}
1719pub struct TypeAlias {
1720    pub(crate) syntax: SyntaxNode,
1721}
1722impl ast::HasAttrs for TypeAlias {}
1723impl ast::HasDocComments for TypeAlias {}
1724impl ast::HasGenericParams for TypeAlias {}
1725impl ast::HasName for TypeAlias {}
1726impl ast::HasTypeBounds for TypeAlias {}
1727impl ast::HasVisibility for TypeAlias {}
1728impl TypeAlias {
1729    #[inline]
1730    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1731    #[inline]
1732    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1733    #[inline]
1734    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1735    #[inline]
1736    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
1737    #[inline]
1738    pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
1739}
1740pub struct TypeAnchor {
1741    pub(crate) syntax: SyntaxNode,
1742}
1743impl TypeAnchor {
1744    #[inline]
1745    pub fn path_type(&self) -> Option<PathType> { support::child(&self.syntax) }
1746    #[inline]
1747    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1748    #[inline]
1749    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
1750    #[inline]
1751    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1752    #[inline]
1753    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1754}
1755pub struct TypeArg {
1756    pub(crate) syntax: SyntaxNode,
1757}
1758impl TypeArg {
1759    #[inline]
1760    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1761}
1762pub struct TypeBound {
1763    pub(crate) syntax: SyntaxNode,
1764}
1765impl TypeBound {
1766    #[inline]
1767    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
1768    #[inline]
1769    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1770    #[inline]
1771    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1772    #[inline]
1773    pub fn use_bound_generic_args(&self) -> Option<UseBoundGenericArgs> {
1774        support::child(&self.syntax)
1775    }
1776    #[inline]
1777    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1778    #[inline]
1779    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1780    #[inline]
1781    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
1782    #[inline]
1783    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
1784    #[inline]
1785    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1786    #[inline]
1787    pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
1788    #[inline]
1789    pub fn tilde_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![~]) }
1790}
1791pub struct TypeBoundList {
1792    pub(crate) syntax: SyntaxNode,
1793}
1794impl TypeBoundList {
1795    #[inline]
1796    pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
1797}
1798pub struct TypeParam {
1799    pub(crate) syntax: SyntaxNode,
1800}
1801impl ast::HasAttrs for TypeParam {}
1802impl ast::HasName for TypeParam {}
1803impl ast::HasTypeBounds for TypeParam {}
1804impl TypeParam {
1805    #[inline]
1806    pub fn default_type(&self) -> Option<Type> { support::child(&self.syntax) }
1807    #[inline]
1808    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1809}
1810pub struct UnderscoreExpr {
1811    pub(crate) syntax: SyntaxNode,
1812}
1813impl ast::HasAttrs for UnderscoreExpr {}
1814impl UnderscoreExpr {
1815    #[inline]
1816    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1817}
1818pub struct Union {
1819    pub(crate) syntax: SyntaxNode,
1820}
1821impl ast::HasAttrs for Union {}
1822impl ast::HasDocComments for Union {}
1823impl ast::HasGenericParams for Union {}
1824impl ast::HasName for Union {}
1825impl ast::HasVisibility for Union {}
1826impl Union {
1827    #[inline]
1828    pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) }
1829    #[inline]
1830    pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) }
1831}
1832pub struct Use {
1833    pub(crate) syntax: SyntaxNode,
1834}
1835impl ast::HasAttrs for Use {}
1836impl ast::HasDocComments for Use {}
1837impl ast::HasVisibility for Use {}
1838impl Use {
1839    #[inline]
1840    pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
1841    #[inline]
1842    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1843    #[inline]
1844    pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
1845}
1846pub struct UseBoundGenericArgs {
1847    pub(crate) syntax: SyntaxNode,
1848}
1849impl UseBoundGenericArgs {
1850    #[inline]
1851    pub fn use_bound_generic_args(&self) -> AstChildren<UseBoundGenericArg> {
1852        support::children(&self.syntax)
1853    }
1854    #[inline]
1855    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
1856    #[inline]
1857    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1858}
1859pub struct UseTree {
1860    pub(crate) syntax: SyntaxNode,
1861}
1862impl UseTree {
1863    #[inline]
1864    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1865    #[inline]
1866    pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
1867    #[inline]
1868    pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
1869    #[inline]
1870    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
1871    #[inline]
1872    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1873}
1874pub struct UseTreeList {
1875    pub(crate) syntax: SyntaxNode,
1876}
1877impl UseTreeList {
1878    #[inline]
1879    pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
1880    #[inline]
1881    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1882    #[inline]
1883    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1884}
1885pub struct Variant {
1886    pub(crate) syntax: SyntaxNode,
1887}
1888impl ast::HasAttrs for Variant {}
1889impl ast::HasDocComments for Variant {}
1890impl ast::HasName for Variant {}
1891impl ast::HasVisibility for Variant {}
1892impl Variant {
1893    #[inline]
1894    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1895    #[inline]
1896    pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
1897    #[inline]
1898    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1899}
1900pub struct VariantList {
1901    pub(crate) syntax: SyntaxNode,
1902}
1903impl VariantList {
1904    #[inline]
1905    pub fn variants(&self) -> AstChildren<Variant> { support::children(&self.syntax) }
1906    #[inline]
1907    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1908    #[inline]
1909    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1910}
1911pub struct Visibility {
1912    pub(crate) syntax: SyntaxNode,
1913}
1914impl Visibility {
1915    #[inline]
1916    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1917    #[inline]
1918    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1919    #[inline]
1920    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1921    #[inline]
1922    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
1923    #[inline]
1924    pub fn pub_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![pub]) }
1925}
1926pub struct WhereClause {
1927    pub(crate) syntax: SyntaxNode,
1928}
1929impl WhereClause {
1930    #[inline]
1931    pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
1932    #[inline]
1933    pub fn where_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![where]) }
1934}
1935pub struct WherePred {
1936    pub(crate) syntax: SyntaxNode,
1937}
1938impl ast::HasTypeBounds for WherePred {}
1939impl WherePred {
1940    #[inline]
1941    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
1942    #[inline]
1943    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1944    #[inline]
1945    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1946}
1947pub struct WhileExpr {
1948    pub(crate) syntax: SyntaxNode,
1949}
1950impl ast::HasAttrs for WhileExpr {}
1951impl WhileExpr {
1952    #[inline]
1953    pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
1954}
1955pub struct WildcardPat {
1956    pub(crate) syntax: SyntaxNode,
1957}
1958impl WildcardPat {
1959    #[inline]
1960    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1961}
1962pub struct YeetExpr {
1963    pub(crate) syntax: SyntaxNode,
1964}
1965impl ast::HasAttrs for YeetExpr {}
1966impl YeetExpr {
1967    #[inline]
1968    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1969    #[inline]
1970    pub fn do_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![do]) }
1971    #[inline]
1972    pub fn yeet_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![yeet]) }
1973}
1974pub struct YieldExpr {
1975    pub(crate) syntax: SyntaxNode,
1976}
1977impl ast::HasAttrs for YieldExpr {}
1978impl YieldExpr {
1979    #[inline]
1980    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1981    #[inline]
1982    pub fn yield_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![yield]) }
1983}
1984
1985#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1986pub enum Adt {
1987    Enum(Enum),
1988    Struct(Struct),
1989    Union(Union),
1990}
1991impl ast::HasAttrs for Adt {}
1992impl ast::HasDocComments for Adt {}
1993impl ast::HasGenericParams for Adt {}
1994impl ast::HasName for Adt {}
1995impl ast::HasVisibility for Adt {}
1996
1997#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1998pub enum AsmOperand {
1999    AsmConst(AsmConst),
2000    AsmLabel(AsmLabel),
2001    AsmRegOperand(AsmRegOperand),
2002    AsmSym(AsmSym),
2003}
2004
2005#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2006pub enum AsmPiece {
2007    AsmClobberAbi(AsmClobberAbi),
2008    AsmOperandNamed(AsmOperandNamed),
2009    AsmOptions(AsmOptions),
2010}
2011
2012#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2013pub enum AssocItem {
2014    Const(Const),
2015    Fn(Fn),
2016    MacroCall(MacroCall),
2017    TypeAlias(TypeAlias),
2018}
2019impl ast::HasAttrs for AssocItem {}
2020impl ast::HasDocComments for AssocItem {}
2021
2022#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2023pub enum Expr {
2024    ArrayExpr(ArrayExpr),
2025    AsmExpr(AsmExpr),
2026    AwaitExpr(AwaitExpr),
2027    BecomeExpr(BecomeExpr),
2028    BinExpr(BinExpr),
2029    BlockExpr(BlockExpr),
2030    BreakExpr(BreakExpr),
2031    CallExpr(CallExpr),
2032    CastExpr(CastExpr),
2033    ClosureExpr(ClosureExpr),
2034    ContinueExpr(ContinueExpr),
2035    FieldExpr(FieldExpr),
2036    ForExpr(ForExpr),
2037    FormatArgsExpr(FormatArgsExpr),
2038    IfExpr(IfExpr),
2039    IndexExpr(IndexExpr),
2040    LetExpr(LetExpr),
2041    Literal(Literal),
2042    LoopExpr(LoopExpr),
2043    MacroExpr(MacroExpr),
2044    MatchExpr(MatchExpr),
2045    MethodCallExpr(MethodCallExpr),
2046    OffsetOfExpr(OffsetOfExpr),
2047    ParenExpr(ParenExpr),
2048    PathExpr(PathExpr),
2049    PrefixExpr(PrefixExpr),
2050    RangeExpr(RangeExpr),
2051    RecordExpr(RecordExpr),
2052    RefExpr(RefExpr),
2053    ReturnExpr(ReturnExpr),
2054    TryExpr(TryExpr),
2055    TupleExpr(TupleExpr),
2056    UnderscoreExpr(UnderscoreExpr),
2057    WhileExpr(WhileExpr),
2058    YeetExpr(YeetExpr),
2059    YieldExpr(YieldExpr),
2060}
2061
2062#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2063pub enum ExternItem {
2064    Fn(Fn),
2065    MacroCall(MacroCall),
2066    Static(Static),
2067    TypeAlias(TypeAlias),
2068}
2069impl ast::HasAttrs for ExternItem {}
2070impl ast::HasDocComments for ExternItem {}
2071
2072#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2073pub enum FieldList {
2074    RecordFieldList(RecordFieldList),
2075    TupleFieldList(TupleFieldList),
2076}
2077
2078#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2079pub enum GenericArg {
2080    AssocTypeArg(AssocTypeArg),
2081    ConstArg(ConstArg),
2082    LifetimeArg(LifetimeArg),
2083    TypeArg(TypeArg),
2084}
2085
2086#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2087pub enum GenericParam {
2088    ConstParam(ConstParam),
2089    LifetimeParam(LifetimeParam),
2090    TypeParam(TypeParam),
2091}
2092impl ast::HasAttrs for GenericParam {}
2093
2094#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2095pub enum Item {
2096    AsmExpr(AsmExpr),
2097    Const(Const),
2098    Enum(Enum),
2099    ExternBlock(ExternBlock),
2100    ExternCrate(ExternCrate),
2101    Fn(Fn),
2102    Impl(Impl),
2103    MacroCall(MacroCall),
2104    MacroDef(MacroDef),
2105    MacroRules(MacroRules),
2106    Module(Module),
2107    Static(Static),
2108    Struct(Struct),
2109    Trait(Trait),
2110    TraitAlias(TraitAlias),
2111    TypeAlias(TypeAlias),
2112    Union(Union),
2113    Use(Use),
2114}
2115impl ast::HasAttrs for Item {}
2116
2117#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2118pub enum Pat {
2119    BoxPat(BoxPat),
2120    ConstBlockPat(ConstBlockPat),
2121    IdentPat(IdentPat),
2122    LiteralPat(LiteralPat),
2123    MacroPat(MacroPat),
2124    OrPat(OrPat),
2125    ParenPat(ParenPat),
2126    PathPat(PathPat),
2127    RangePat(RangePat),
2128    RecordPat(RecordPat),
2129    RefPat(RefPat),
2130    RestPat(RestPat),
2131    SlicePat(SlicePat),
2132    TuplePat(TuplePat),
2133    TupleStructPat(TupleStructPat),
2134    WildcardPat(WildcardPat),
2135}
2136
2137#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2138pub enum Stmt {
2139    ExprStmt(ExprStmt),
2140    Item(Item),
2141    LetStmt(LetStmt),
2142}
2143
2144#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2145pub enum Type {
2146    ArrayType(ArrayType),
2147    DynTraitType(DynTraitType),
2148    FnPtrType(FnPtrType),
2149    ForType(ForType),
2150    ImplTraitType(ImplTraitType),
2151    InferType(InferType),
2152    MacroType(MacroType),
2153    NeverType(NeverType),
2154    ParenType(ParenType),
2155    PathType(PathType),
2156    PtrType(PtrType),
2157    RefType(RefType),
2158    SliceType(SliceType),
2159    TupleType(TupleType),
2160}
2161
2162#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2163pub enum UseBoundGenericArg {
2164    Lifetime(Lifetime),
2165    NameRef(NameRef),
2166}
2167
2168#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2169pub enum VariantDef {
2170    Struct(Struct),
2171    Union(Union),
2172    Variant(Variant),
2173}
2174impl ast::HasAttrs for VariantDef {}
2175impl ast::HasDocComments for VariantDef {}
2176impl ast::HasName for VariantDef {}
2177impl ast::HasVisibility for VariantDef {}
2178pub struct AnyHasArgList {
2179    pub(crate) syntax: SyntaxNode,
2180}
2181impl AnyHasArgList {
2182    #[inline]
2183    pub fn new<T: ast::HasArgList>(node: T) -> AnyHasArgList {
2184        AnyHasArgList { syntax: node.syntax().clone() }
2185    }
2186}
2187pub struct AnyHasAttrs {
2188    pub(crate) syntax: SyntaxNode,
2189}
2190impl AnyHasAttrs {
2191    #[inline]
2192    pub fn new<T: ast::HasAttrs>(node: T) -> AnyHasAttrs {
2193        AnyHasAttrs { syntax: node.syntax().clone() }
2194    }
2195}
2196pub struct AnyHasDocComments {
2197    pub(crate) syntax: SyntaxNode,
2198}
2199impl AnyHasDocComments {
2200    #[inline]
2201    pub fn new<T: ast::HasDocComments>(node: T) -> AnyHasDocComments {
2202        AnyHasDocComments { syntax: node.syntax().clone() }
2203    }
2204}
2205pub struct AnyHasGenericArgs {
2206    pub(crate) syntax: SyntaxNode,
2207}
2208impl AnyHasGenericArgs {
2209    #[inline]
2210    pub fn new<T: ast::HasGenericArgs>(node: T) -> AnyHasGenericArgs {
2211        AnyHasGenericArgs { syntax: node.syntax().clone() }
2212    }
2213}
2214pub struct AnyHasGenericParams {
2215    pub(crate) syntax: SyntaxNode,
2216}
2217impl AnyHasGenericParams {
2218    #[inline]
2219    pub fn new<T: ast::HasGenericParams>(node: T) -> AnyHasGenericParams {
2220        AnyHasGenericParams { syntax: node.syntax().clone() }
2221    }
2222}
2223pub struct AnyHasLoopBody {
2224    pub(crate) syntax: SyntaxNode,
2225}
2226impl AnyHasLoopBody {
2227    #[inline]
2228    pub fn new<T: ast::HasLoopBody>(node: T) -> AnyHasLoopBody {
2229        AnyHasLoopBody { syntax: node.syntax().clone() }
2230    }
2231}
2232pub struct AnyHasModuleItem {
2233    pub(crate) syntax: SyntaxNode,
2234}
2235impl AnyHasModuleItem {
2236    #[inline]
2237    pub fn new<T: ast::HasModuleItem>(node: T) -> AnyHasModuleItem {
2238        AnyHasModuleItem { syntax: node.syntax().clone() }
2239    }
2240}
2241pub struct AnyHasName {
2242    pub(crate) syntax: SyntaxNode,
2243}
2244impl AnyHasName {
2245    #[inline]
2246    pub fn new<T: ast::HasName>(node: T) -> AnyHasName {
2247        AnyHasName { syntax: node.syntax().clone() }
2248    }
2249}
2250pub struct AnyHasTypeBounds {
2251    pub(crate) syntax: SyntaxNode,
2252}
2253impl AnyHasTypeBounds {
2254    #[inline]
2255    pub fn new<T: ast::HasTypeBounds>(node: T) -> AnyHasTypeBounds {
2256        AnyHasTypeBounds { syntax: node.syntax().clone() }
2257    }
2258}
2259pub struct AnyHasVisibility {
2260    pub(crate) syntax: SyntaxNode,
2261}
2262impl AnyHasVisibility {
2263    #[inline]
2264    pub fn new<T: ast::HasVisibility>(node: T) -> AnyHasVisibility {
2265        AnyHasVisibility { syntax: node.syntax().clone() }
2266    }
2267}
2268impl AstNode for Abi {
2269    #[inline]
2270    fn kind() -> SyntaxKind
2271    where
2272        Self: Sized,
2273    {
2274        ABI
2275    }
2276    #[inline]
2277    fn can_cast(kind: SyntaxKind) -> bool { kind == ABI }
2278    #[inline]
2279    fn cast(syntax: SyntaxNode) -> Option<Self> {
2280        if Self::can_cast(syntax.kind()) {
2281            Some(Self { syntax })
2282        } else {
2283            None
2284        }
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()) {
2317            Some(Self { syntax })
2318        } else {
2319            None
2320        }
2321    }
2322    #[inline]
2323    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2324}
2325impl hash::Hash for ArgList {
2326    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2327}
2328impl Eq for ArgList {}
2329impl PartialEq for ArgList {
2330    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2331}
2332impl Clone for ArgList {
2333    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2334}
2335impl fmt::Debug for ArgList {
2336    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2337        f.debug_struct("ArgList").field("syntax", &self.syntax).finish()
2338    }
2339}
2340impl AstNode for ArrayExpr {
2341    #[inline]
2342    fn kind() -> SyntaxKind
2343    where
2344        Self: Sized,
2345    {
2346        ARRAY_EXPR
2347    }
2348    #[inline]
2349    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR }
2350    #[inline]
2351    fn cast(syntax: SyntaxNode) -> Option<Self> {
2352        if Self::can_cast(syntax.kind()) {
2353            Some(Self { syntax })
2354        } else {
2355            None
2356        }
2357    }
2358    #[inline]
2359    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2360}
2361impl hash::Hash for ArrayExpr {
2362    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2363}
2364impl Eq for ArrayExpr {}
2365impl PartialEq for ArrayExpr {
2366    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2367}
2368impl Clone for ArrayExpr {
2369    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2370}
2371impl fmt::Debug for ArrayExpr {
2372    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2373        f.debug_struct("ArrayExpr").field("syntax", &self.syntax).finish()
2374    }
2375}
2376impl AstNode for ArrayType {
2377    #[inline]
2378    fn kind() -> SyntaxKind
2379    where
2380        Self: Sized,
2381    {
2382        ARRAY_TYPE
2383    }
2384    #[inline]
2385    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE }
2386    #[inline]
2387    fn cast(syntax: SyntaxNode) -> Option<Self> {
2388        if Self::can_cast(syntax.kind()) {
2389            Some(Self { syntax })
2390        } else {
2391            None
2392        }
2393    }
2394    #[inline]
2395    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2396}
2397impl hash::Hash for ArrayType {
2398    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2399}
2400impl Eq for ArrayType {}
2401impl PartialEq for ArrayType {
2402    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2403}
2404impl Clone for ArrayType {
2405    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2406}
2407impl fmt::Debug for ArrayType {
2408    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2409        f.debug_struct("ArrayType").field("syntax", &self.syntax).finish()
2410    }
2411}
2412impl AstNode for AsmClobberAbi {
2413    #[inline]
2414    fn kind() -> SyntaxKind
2415    where
2416        Self: Sized,
2417    {
2418        ASM_CLOBBER_ABI
2419    }
2420    #[inline]
2421    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_CLOBBER_ABI }
2422    #[inline]
2423    fn cast(syntax: SyntaxNode) -> Option<Self> {
2424        if Self::can_cast(syntax.kind()) {
2425            Some(Self { syntax })
2426        } else {
2427            None
2428        }
2429    }
2430    #[inline]
2431    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2432}
2433impl hash::Hash for AsmClobberAbi {
2434    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2435}
2436impl Eq for AsmClobberAbi {}
2437impl PartialEq for AsmClobberAbi {
2438    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2439}
2440impl Clone for AsmClobberAbi {
2441    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2442}
2443impl fmt::Debug for AsmClobberAbi {
2444    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2445        f.debug_struct("AsmClobberAbi").field("syntax", &self.syntax).finish()
2446    }
2447}
2448impl AstNode for AsmConst {
2449    #[inline]
2450    fn kind() -> SyntaxKind
2451    where
2452        Self: Sized,
2453    {
2454        ASM_CONST
2455    }
2456    #[inline]
2457    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_CONST }
2458    #[inline]
2459    fn cast(syntax: SyntaxNode) -> Option<Self> {
2460        if Self::can_cast(syntax.kind()) {
2461            Some(Self { syntax })
2462        } else {
2463            None
2464        }
2465    }
2466    #[inline]
2467    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2468}
2469impl hash::Hash for AsmConst {
2470    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2471}
2472impl Eq for AsmConst {}
2473impl PartialEq for AsmConst {
2474    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2475}
2476impl Clone for AsmConst {
2477    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2478}
2479impl fmt::Debug for AsmConst {
2480    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2481        f.debug_struct("AsmConst").field("syntax", &self.syntax).finish()
2482    }
2483}
2484impl AstNode for AsmDirSpec {
2485    #[inline]
2486    fn kind() -> SyntaxKind
2487    where
2488        Self: Sized,
2489    {
2490        ASM_DIR_SPEC
2491    }
2492    #[inline]
2493    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_DIR_SPEC }
2494    #[inline]
2495    fn cast(syntax: SyntaxNode) -> Option<Self> {
2496        if Self::can_cast(syntax.kind()) {
2497            Some(Self { syntax })
2498        } else {
2499            None
2500        }
2501    }
2502    #[inline]
2503    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2504}
2505impl hash::Hash for AsmDirSpec {
2506    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2507}
2508impl Eq for AsmDirSpec {}
2509impl PartialEq for AsmDirSpec {
2510    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2511}
2512impl Clone for AsmDirSpec {
2513    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2514}
2515impl fmt::Debug for AsmDirSpec {
2516    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2517        f.debug_struct("AsmDirSpec").field("syntax", &self.syntax).finish()
2518    }
2519}
2520impl AstNode for AsmExpr {
2521    #[inline]
2522    fn kind() -> SyntaxKind
2523    where
2524        Self: Sized,
2525    {
2526        ASM_EXPR
2527    }
2528    #[inline]
2529    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_EXPR }
2530    #[inline]
2531    fn cast(syntax: SyntaxNode) -> Option<Self> {
2532        if Self::can_cast(syntax.kind()) {
2533            Some(Self { syntax })
2534        } else {
2535            None
2536        }
2537    }
2538    #[inline]
2539    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2540}
2541impl hash::Hash for AsmExpr {
2542    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2543}
2544impl Eq for AsmExpr {}
2545impl PartialEq for AsmExpr {
2546    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2547}
2548impl Clone for AsmExpr {
2549    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2550}
2551impl fmt::Debug for AsmExpr {
2552    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2553        f.debug_struct("AsmExpr").field("syntax", &self.syntax).finish()
2554    }
2555}
2556impl AstNode for AsmLabel {
2557    #[inline]
2558    fn kind() -> SyntaxKind
2559    where
2560        Self: Sized,
2561    {
2562        ASM_LABEL
2563    }
2564    #[inline]
2565    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_LABEL }
2566    #[inline]
2567    fn cast(syntax: SyntaxNode) -> Option<Self> {
2568        if Self::can_cast(syntax.kind()) {
2569            Some(Self { syntax })
2570        } else {
2571            None
2572        }
2573    }
2574    #[inline]
2575    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2576}
2577impl hash::Hash for AsmLabel {
2578    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2579}
2580impl Eq for AsmLabel {}
2581impl PartialEq for AsmLabel {
2582    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2583}
2584impl Clone for AsmLabel {
2585    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2586}
2587impl fmt::Debug for AsmLabel {
2588    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2589        f.debug_struct("AsmLabel").field("syntax", &self.syntax).finish()
2590    }
2591}
2592impl AstNode for AsmOperandExpr {
2593    #[inline]
2594    fn kind() -> SyntaxKind
2595    where
2596        Self: Sized,
2597    {
2598        ASM_OPERAND_EXPR
2599    }
2600    #[inline]
2601    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPERAND_EXPR }
2602    #[inline]
2603    fn cast(syntax: SyntaxNode) -> Option<Self> {
2604        if Self::can_cast(syntax.kind()) {
2605            Some(Self { syntax })
2606        } else {
2607            None
2608        }
2609    }
2610    #[inline]
2611    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2612}
2613impl hash::Hash for AsmOperandExpr {
2614    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2615}
2616impl Eq for AsmOperandExpr {}
2617impl PartialEq for AsmOperandExpr {
2618    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2619}
2620impl Clone for AsmOperandExpr {
2621    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2622}
2623impl fmt::Debug for AsmOperandExpr {
2624    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2625        f.debug_struct("AsmOperandExpr").field("syntax", &self.syntax).finish()
2626    }
2627}
2628impl AstNode for AsmOperandNamed {
2629    #[inline]
2630    fn kind() -> SyntaxKind
2631    where
2632        Self: Sized,
2633    {
2634        ASM_OPERAND_NAMED
2635    }
2636    #[inline]
2637    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPERAND_NAMED }
2638    #[inline]
2639    fn cast(syntax: SyntaxNode) -> Option<Self> {
2640        if Self::can_cast(syntax.kind()) {
2641            Some(Self { syntax })
2642        } else {
2643            None
2644        }
2645    }
2646    #[inline]
2647    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2648}
2649impl hash::Hash for AsmOperandNamed {
2650    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2651}
2652impl Eq for AsmOperandNamed {}
2653impl PartialEq for AsmOperandNamed {
2654    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2655}
2656impl Clone for AsmOperandNamed {
2657    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2658}
2659impl fmt::Debug for AsmOperandNamed {
2660    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2661        f.debug_struct("AsmOperandNamed").field("syntax", &self.syntax).finish()
2662    }
2663}
2664impl AstNode for AsmOption {
2665    #[inline]
2666    fn kind() -> SyntaxKind
2667    where
2668        Self: Sized,
2669    {
2670        ASM_OPTION
2671    }
2672    #[inline]
2673    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPTION }
2674    #[inline]
2675    fn cast(syntax: SyntaxNode) -> Option<Self> {
2676        if Self::can_cast(syntax.kind()) {
2677            Some(Self { syntax })
2678        } else {
2679            None
2680        }
2681    }
2682    #[inline]
2683    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2684}
2685impl hash::Hash for AsmOption {
2686    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2687}
2688impl Eq for AsmOption {}
2689impl PartialEq for AsmOption {
2690    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2691}
2692impl Clone for AsmOption {
2693    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2694}
2695impl fmt::Debug for AsmOption {
2696    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2697        f.debug_struct("AsmOption").field("syntax", &self.syntax).finish()
2698    }
2699}
2700impl AstNode for AsmOptions {
2701    #[inline]
2702    fn kind() -> SyntaxKind
2703    where
2704        Self: Sized,
2705    {
2706        ASM_OPTIONS
2707    }
2708    #[inline]
2709    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPTIONS }
2710    #[inline]
2711    fn cast(syntax: SyntaxNode) -> Option<Self> {
2712        if Self::can_cast(syntax.kind()) {
2713            Some(Self { syntax })
2714        } else {
2715            None
2716        }
2717    }
2718    #[inline]
2719    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2720}
2721impl hash::Hash for AsmOptions {
2722    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2723}
2724impl Eq for AsmOptions {}
2725impl PartialEq for AsmOptions {
2726    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2727}
2728impl Clone for AsmOptions {
2729    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2730}
2731impl fmt::Debug for AsmOptions {
2732    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2733        f.debug_struct("AsmOptions").field("syntax", &self.syntax).finish()
2734    }
2735}
2736impl AstNode for AsmRegOperand {
2737    #[inline]
2738    fn kind() -> SyntaxKind
2739    where
2740        Self: Sized,
2741    {
2742        ASM_REG_OPERAND
2743    }
2744    #[inline]
2745    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_REG_OPERAND }
2746    #[inline]
2747    fn cast(syntax: SyntaxNode) -> Option<Self> {
2748        if Self::can_cast(syntax.kind()) {
2749            Some(Self { syntax })
2750        } else {
2751            None
2752        }
2753    }
2754    #[inline]
2755    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2756}
2757impl hash::Hash for AsmRegOperand {
2758    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2759}
2760impl Eq for AsmRegOperand {}
2761impl PartialEq for AsmRegOperand {
2762    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2763}
2764impl Clone for AsmRegOperand {
2765    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2766}
2767impl fmt::Debug for AsmRegOperand {
2768    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2769        f.debug_struct("AsmRegOperand").field("syntax", &self.syntax).finish()
2770    }
2771}
2772impl AstNode for AsmRegSpec {
2773    #[inline]
2774    fn kind() -> SyntaxKind
2775    where
2776        Self: Sized,
2777    {
2778        ASM_REG_SPEC
2779    }
2780    #[inline]
2781    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_REG_SPEC }
2782    #[inline]
2783    fn cast(syntax: SyntaxNode) -> Option<Self> {
2784        if Self::can_cast(syntax.kind()) {
2785            Some(Self { syntax })
2786        } else {
2787            None
2788        }
2789    }
2790    #[inline]
2791    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2792}
2793impl hash::Hash for AsmRegSpec {
2794    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2795}
2796impl Eq for AsmRegSpec {}
2797impl PartialEq for AsmRegSpec {
2798    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2799}
2800impl Clone for AsmRegSpec {
2801    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2802}
2803impl fmt::Debug for AsmRegSpec {
2804    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2805        f.debug_struct("AsmRegSpec").field("syntax", &self.syntax).finish()
2806    }
2807}
2808impl AstNode for AsmSym {
2809    #[inline]
2810    fn kind() -> SyntaxKind
2811    where
2812        Self: Sized,
2813    {
2814        ASM_SYM
2815    }
2816    #[inline]
2817    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_SYM }
2818    #[inline]
2819    fn cast(syntax: SyntaxNode) -> Option<Self> {
2820        if Self::can_cast(syntax.kind()) {
2821            Some(Self { syntax })
2822        } else {
2823            None
2824        }
2825    }
2826    #[inline]
2827    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2828}
2829impl hash::Hash for AsmSym {
2830    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2831}
2832impl Eq for AsmSym {}
2833impl PartialEq for AsmSym {
2834    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2835}
2836impl Clone for AsmSym {
2837    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2838}
2839impl fmt::Debug for AsmSym {
2840    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2841        f.debug_struct("AsmSym").field("syntax", &self.syntax).finish()
2842    }
2843}
2844impl AstNode for AssocItemList {
2845    #[inline]
2846    fn kind() -> SyntaxKind
2847    where
2848        Self: Sized,
2849    {
2850        ASSOC_ITEM_LIST
2851    }
2852    #[inline]
2853    fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_ITEM_LIST }
2854    #[inline]
2855    fn cast(syntax: SyntaxNode) -> Option<Self> {
2856        if Self::can_cast(syntax.kind()) {
2857            Some(Self { syntax })
2858        } else {
2859            None
2860        }
2861    }
2862    #[inline]
2863    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2864}
2865impl hash::Hash for AssocItemList {
2866    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2867}
2868impl Eq for AssocItemList {}
2869impl PartialEq for AssocItemList {
2870    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2871}
2872impl Clone for AssocItemList {
2873    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2874}
2875impl fmt::Debug for AssocItemList {
2876    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2877        f.debug_struct("AssocItemList").field("syntax", &self.syntax).finish()
2878    }
2879}
2880impl AstNode for AssocTypeArg {
2881    #[inline]
2882    fn kind() -> SyntaxKind
2883    where
2884        Self: Sized,
2885    {
2886        ASSOC_TYPE_ARG
2887    }
2888    #[inline]
2889    fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_TYPE_ARG }
2890    #[inline]
2891    fn cast(syntax: SyntaxNode) -> Option<Self> {
2892        if Self::can_cast(syntax.kind()) {
2893            Some(Self { syntax })
2894        } else {
2895            None
2896        }
2897    }
2898    #[inline]
2899    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2900}
2901impl hash::Hash for AssocTypeArg {
2902    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2903}
2904impl Eq for AssocTypeArg {}
2905impl PartialEq for AssocTypeArg {
2906    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2907}
2908impl Clone for AssocTypeArg {
2909    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2910}
2911impl fmt::Debug for AssocTypeArg {
2912    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2913        f.debug_struct("AssocTypeArg").field("syntax", &self.syntax).finish()
2914    }
2915}
2916impl AstNode for Attr {
2917    #[inline]
2918    fn kind() -> SyntaxKind
2919    where
2920        Self: Sized,
2921    {
2922        ATTR
2923    }
2924    #[inline]
2925    fn can_cast(kind: SyntaxKind) -> bool { kind == ATTR }
2926    #[inline]
2927    fn cast(syntax: SyntaxNode) -> Option<Self> {
2928        if Self::can_cast(syntax.kind()) {
2929            Some(Self { syntax })
2930        } else {
2931            None
2932        }
2933    }
2934    #[inline]
2935    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2936}
2937impl hash::Hash for Attr {
2938    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2939}
2940impl Eq for Attr {}
2941impl PartialEq for Attr {
2942    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2943}
2944impl Clone for Attr {
2945    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2946}
2947impl fmt::Debug for Attr {
2948    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2949        f.debug_struct("Attr").field("syntax", &self.syntax).finish()
2950    }
2951}
2952impl AstNode for AwaitExpr {
2953    #[inline]
2954    fn kind() -> SyntaxKind
2955    where
2956        Self: Sized,
2957    {
2958        AWAIT_EXPR
2959    }
2960    #[inline]
2961    fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR }
2962    #[inline]
2963    fn cast(syntax: SyntaxNode) -> Option<Self> {
2964        if Self::can_cast(syntax.kind()) {
2965            Some(Self { syntax })
2966        } else {
2967            None
2968        }
2969    }
2970    #[inline]
2971    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2972}
2973impl hash::Hash for AwaitExpr {
2974    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2975}
2976impl Eq for AwaitExpr {}
2977impl PartialEq for AwaitExpr {
2978    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2979}
2980impl Clone for AwaitExpr {
2981    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2982}
2983impl fmt::Debug for AwaitExpr {
2984    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2985        f.debug_struct("AwaitExpr").field("syntax", &self.syntax).finish()
2986    }
2987}
2988impl AstNode for BecomeExpr {
2989    #[inline]
2990    fn kind() -> SyntaxKind
2991    where
2992        Self: Sized,
2993    {
2994        BECOME_EXPR
2995    }
2996    #[inline]
2997    fn can_cast(kind: SyntaxKind) -> bool { kind == BECOME_EXPR }
2998    #[inline]
2999    fn cast(syntax: SyntaxNode) -> Option<Self> {
3000        if Self::can_cast(syntax.kind()) {
3001            Some(Self { syntax })
3002        } else {
3003            None
3004        }
3005    }
3006    #[inline]
3007    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3008}
3009impl hash::Hash for BecomeExpr {
3010    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3011}
3012impl Eq for BecomeExpr {}
3013impl PartialEq for BecomeExpr {
3014    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3015}
3016impl Clone for BecomeExpr {
3017    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3018}
3019impl fmt::Debug for BecomeExpr {
3020    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3021        f.debug_struct("BecomeExpr").field("syntax", &self.syntax).finish()
3022    }
3023}
3024impl AstNode for BinExpr {
3025    #[inline]
3026    fn kind() -> SyntaxKind
3027    where
3028        Self: Sized,
3029    {
3030        BIN_EXPR
3031    }
3032    #[inline]
3033    fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR }
3034    #[inline]
3035    fn cast(syntax: SyntaxNode) -> Option<Self> {
3036        if Self::can_cast(syntax.kind()) {
3037            Some(Self { syntax })
3038        } else {
3039            None
3040        }
3041    }
3042    #[inline]
3043    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3044}
3045impl hash::Hash for BinExpr {
3046    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3047}
3048impl Eq for BinExpr {}
3049impl PartialEq for BinExpr {
3050    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3051}
3052impl Clone for BinExpr {
3053    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3054}
3055impl fmt::Debug for BinExpr {
3056    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3057        f.debug_struct("BinExpr").field("syntax", &self.syntax).finish()
3058    }
3059}
3060impl AstNode for BlockExpr {
3061    #[inline]
3062    fn kind() -> SyntaxKind
3063    where
3064        Self: Sized,
3065    {
3066        BLOCK_EXPR
3067    }
3068    #[inline]
3069    fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK_EXPR }
3070    #[inline]
3071    fn cast(syntax: SyntaxNode) -> Option<Self> {
3072        if Self::can_cast(syntax.kind()) {
3073            Some(Self { syntax })
3074        } else {
3075            None
3076        }
3077    }
3078    #[inline]
3079    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3080}
3081impl hash::Hash for BlockExpr {
3082    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3083}
3084impl Eq for BlockExpr {}
3085impl PartialEq for BlockExpr {
3086    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3087}
3088impl Clone for BlockExpr {
3089    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3090}
3091impl fmt::Debug for BlockExpr {
3092    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3093        f.debug_struct("BlockExpr").field("syntax", &self.syntax).finish()
3094    }
3095}
3096impl AstNode for BoxPat {
3097    #[inline]
3098    fn kind() -> SyntaxKind
3099    where
3100        Self: Sized,
3101    {
3102        BOX_PAT
3103    }
3104    #[inline]
3105    fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_PAT }
3106    #[inline]
3107    fn cast(syntax: SyntaxNode) -> Option<Self> {
3108        if Self::can_cast(syntax.kind()) {
3109            Some(Self { syntax })
3110        } else {
3111            None
3112        }
3113    }
3114    #[inline]
3115    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3116}
3117impl hash::Hash for BoxPat {
3118    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3119}
3120impl Eq for BoxPat {}
3121impl PartialEq for BoxPat {
3122    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3123}
3124impl Clone for BoxPat {
3125    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3126}
3127impl fmt::Debug for BoxPat {
3128    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3129        f.debug_struct("BoxPat").field("syntax", &self.syntax).finish()
3130    }
3131}
3132impl AstNode for BreakExpr {
3133    #[inline]
3134    fn kind() -> SyntaxKind
3135    where
3136        Self: Sized,
3137    {
3138        BREAK_EXPR
3139    }
3140    #[inline]
3141    fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR }
3142    #[inline]
3143    fn cast(syntax: SyntaxNode) -> Option<Self> {
3144        if Self::can_cast(syntax.kind()) {
3145            Some(Self { syntax })
3146        } else {
3147            None
3148        }
3149    }
3150    #[inline]
3151    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3152}
3153impl hash::Hash for BreakExpr {
3154    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3155}
3156impl Eq for BreakExpr {}
3157impl PartialEq for BreakExpr {
3158    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3159}
3160impl Clone for BreakExpr {
3161    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3162}
3163impl fmt::Debug for BreakExpr {
3164    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3165        f.debug_struct("BreakExpr").field("syntax", &self.syntax).finish()
3166    }
3167}
3168impl AstNode for CallExpr {
3169    #[inline]
3170    fn kind() -> SyntaxKind
3171    where
3172        Self: Sized,
3173    {
3174        CALL_EXPR
3175    }
3176    #[inline]
3177    fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR }
3178    #[inline]
3179    fn cast(syntax: SyntaxNode) -> Option<Self> {
3180        if Self::can_cast(syntax.kind()) {
3181            Some(Self { syntax })
3182        } else {
3183            None
3184        }
3185    }
3186    #[inline]
3187    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3188}
3189impl hash::Hash for CallExpr {
3190    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3191}
3192impl Eq for CallExpr {}
3193impl PartialEq for CallExpr {
3194    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3195}
3196impl Clone for CallExpr {
3197    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3198}
3199impl fmt::Debug for CallExpr {
3200    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3201        f.debug_struct("CallExpr").field("syntax", &self.syntax).finish()
3202    }
3203}
3204impl AstNode for CastExpr {
3205    #[inline]
3206    fn kind() -> SyntaxKind
3207    where
3208        Self: Sized,
3209    {
3210        CAST_EXPR
3211    }
3212    #[inline]
3213    fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR }
3214    #[inline]
3215    fn cast(syntax: SyntaxNode) -> Option<Self> {
3216        if Self::can_cast(syntax.kind()) {
3217            Some(Self { syntax })
3218        } else {
3219            None
3220        }
3221    }
3222    #[inline]
3223    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3224}
3225impl hash::Hash for CastExpr {
3226    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3227}
3228impl Eq for CastExpr {}
3229impl PartialEq for CastExpr {
3230    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3231}
3232impl Clone for CastExpr {
3233    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3234}
3235impl fmt::Debug for CastExpr {
3236    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3237        f.debug_struct("CastExpr").field("syntax", &self.syntax).finish()
3238    }
3239}
3240impl AstNode for ClosureExpr {
3241    #[inline]
3242    fn kind() -> SyntaxKind
3243    where
3244        Self: Sized,
3245    {
3246        CLOSURE_EXPR
3247    }
3248    #[inline]
3249    fn can_cast(kind: SyntaxKind) -> bool { kind == CLOSURE_EXPR }
3250    #[inline]
3251    fn cast(syntax: SyntaxNode) -> Option<Self> {
3252        if Self::can_cast(syntax.kind()) {
3253            Some(Self { syntax })
3254        } else {
3255            None
3256        }
3257    }
3258    #[inline]
3259    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3260}
3261impl hash::Hash for ClosureExpr {
3262    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3263}
3264impl Eq for ClosureExpr {}
3265impl PartialEq for ClosureExpr {
3266    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3267}
3268impl Clone for ClosureExpr {
3269    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3270}
3271impl fmt::Debug for ClosureExpr {
3272    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3273        f.debug_struct("ClosureExpr").field("syntax", &self.syntax).finish()
3274    }
3275}
3276impl AstNode for Const {
3277    #[inline]
3278    fn kind() -> SyntaxKind
3279    where
3280        Self: Sized,
3281    {
3282        CONST
3283    }
3284    #[inline]
3285    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST }
3286    #[inline]
3287    fn cast(syntax: SyntaxNode) -> Option<Self> {
3288        if Self::can_cast(syntax.kind()) {
3289            Some(Self { syntax })
3290        } else {
3291            None
3292        }
3293    }
3294    #[inline]
3295    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3296}
3297impl hash::Hash for Const {
3298    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3299}
3300impl Eq for Const {}
3301impl PartialEq for Const {
3302    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3303}
3304impl Clone for Const {
3305    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3306}
3307impl fmt::Debug for Const {
3308    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3309        f.debug_struct("Const").field("syntax", &self.syntax).finish()
3310    }
3311}
3312impl AstNode for ConstArg {
3313    #[inline]
3314    fn kind() -> SyntaxKind
3315    where
3316        Self: Sized,
3317    {
3318        CONST_ARG
3319    }
3320    #[inline]
3321    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_ARG }
3322    #[inline]
3323    fn cast(syntax: SyntaxNode) -> Option<Self> {
3324        if Self::can_cast(syntax.kind()) {
3325            Some(Self { syntax })
3326        } else {
3327            None
3328        }
3329    }
3330    #[inline]
3331    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3332}
3333impl hash::Hash for ConstArg {
3334    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3335}
3336impl Eq for ConstArg {}
3337impl PartialEq for ConstArg {
3338    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3339}
3340impl Clone for ConstArg {
3341    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3342}
3343impl fmt::Debug for ConstArg {
3344    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3345        f.debug_struct("ConstArg").field("syntax", &self.syntax).finish()
3346    }
3347}
3348impl AstNode for ConstBlockPat {
3349    #[inline]
3350    fn kind() -> SyntaxKind
3351    where
3352        Self: Sized,
3353    {
3354        CONST_BLOCK_PAT
3355    }
3356    #[inline]
3357    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_BLOCK_PAT }
3358    #[inline]
3359    fn cast(syntax: SyntaxNode) -> Option<Self> {
3360        if Self::can_cast(syntax.kind()) {
3361            Some(Self { syntax })
3362        } else {
3363            None
3364        }
3365    }
3366    #[inline]
3367    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3368}
3369impl hash::Hash for ConstBlockPat {
3370    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3371}
3372impl Eq for ConstBlockPat {}
3373impl PartialEq for ConstBlockPat {
3374    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3375}
3376impl Clone for ConstBlockPat {
3377    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3378}
3379impl fmt::Debug for ConstBlockPat {
3380    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3381        f.debug_struct("ConstBlockPat").field("syntax", &self.syntax).finish()
3382    }
3383}
3384impl AstNode for ConstParam {
3385    #[inline]
3386    fn kind() -> SyntaxKind
3387    where
3388        Self: Sized,
3389    {
3390        CONST_PARAM
3391    }
3392    #[inline]
3393    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM }
3394    #[inline]
3395    fn cast(syntax: SyntaxNode) -> Option<Self> {
3396        if Self::can_cast(syntax.kind()) {
3397            Some(Self { syntax })
3398        } else {
3399            None
3400        }
3401    }
3402    #[inline]
3403    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3404}
3405impl hash::Hash for ConstParam {
3406    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3407}
3408impl Eq for ConstParam {}
3409impl PartialEq for ConstParam {
3410    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3411}
3412impl Clone for ConstParam {
3413    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3414}
3415impl fmt::Debug for ConstParam {
3416    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3417        f.debug_struct("ConstParam").field("syntax", &self.syntax).finish()
3418    }
3419}
3420impl AstNode for ContinueExpr {
3421    #[inline]
3422    fn kind() -> SyntaxKind
3423    where
3424        Self: Sized,
3425    {
3426        CONTINUE_EXPR
3427    }
3428    #[inline]
3429    fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR }
3430    #[inline]
3431    fn cast(syntax: SyntaxNode) -> Option<Self> {
3432        if Self::can_cast(syntax.kind()) {
3433            Some(Self { syntax })
3434        } else {
3435            None
3436        }
3437    }
3438    #[inline]
3439    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3440}
3441impl hash::Hash for ContinueExpr {
3442    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3443}
3444impl Eq for ContinueExpr {}
3445impl PartialEq for ContinueExpr {
3446    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3447}
3448impl Clone for ContinueExpr {
3449    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3450}
3451impl fmt::Debug for ContinueExpr {
3452    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3453        f.debug_struct("ContinueExpr").field("syntax", &self.syntax).finish()
3454    }
3455}
3456impl AstNode for DynTraitType {
3457    #[inline]
3458    fn kind() -> SyntaxKind
3459    where
3460        Self: Sized,
3461    {
3462        DYN_TRAIT_TYPE
3463    }
3464    #[inline]
3465    fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE }
3466    #[inline]
3467    fn cast(syntax: SyntaxNode) -> Option<Self> {
3468        if Self::can_cast(syntax.kind()) {
3469            Some(Self { syntax })
3470        } else {
3471            None
3472        }
3473    }
3474    #[inline]
3475    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3476}
3477impl hash::Hash for DynTraitType {
3478    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3479}
3480impl Eq for DynTraitType {}
3481impl PartialEq for DynTraitType {
3482    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3483}
3484impl Clone for DynTraitType {
3485    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3486}
3487impl fmt::Debug for DynTraitType {
3488    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3489        f.debug_struct("DynTraitType").field("syntax", &self.syntax).finish()
3490    }
3491}
3492impl AstNode for Enum {
3493    #[inline]
3494    fn kind() -> SyntaxKind
3495    where
3496        Self: Sized,
3497    {
3498        ENUM
3499    }
3500    #[inline]
3501    fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM }
3502    #[inline]
3503    fn cast(syntax: SyntaxNode) -> Option<Self> {
3504        if Self::can_cast(syntax.kind()) {
3505            Some(Self { syntax })
3506        } else {
3507            None
3508        }
3509    }
3510    #[inline]
3511    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3512}
3513impl hash::Hash for Enum {
3514    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3515}
3516impl Eq for Enum {}
3517impl PartialEq for Enum {
3518    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3519}
3520impl Clone for Enum {
3521    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3522}
3523impl fmt::Debug for Enum {
3524    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3525        f.debug_struct("Enum").field("syntax", &self.syntax).finish()
3526    }
3527}
3528impl AstNode for ExprStmt {
3529    #[inline]
3530    fn kind() -> SyntaxKind
3531    where
3532        Self: Sized,
3533    {
3534        EXPR_STMT
3535    }
3536    #[inline]
3537    fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
3538    #[inline]
3539    fn cast(syntax: SyntaxNode) -> Option<Self> {
3540        if Self::can_cast(syntax.kind()) {
3541            Some(Self { syntax })
3542        } else {
3543            None
3544        }
3545    }
3546    #[inline]
3547    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3548}
3549impl hash::Hash for ExprStmt {
3550    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3551}
3552impl Eq for ExprStmt {}
3553impl PartialEq for ExprStmt {
3554    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3555}
3556impl Clone for ExprStmt {
3557    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3558}
3559impl fmt::Debug for ExprStmt {
3560    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3561        f.debug_struct("ExprStmt").field("syntax", &self.syntax).finish()
3562    }
3563}
3564impl AstNode for ExternBlock {
3565    #[inline]
3566    fn kind() -> SyntaxKind
3567    where
3568        Self: Sized,
3569    {
3570        EXTERN_BLOCK
3571    }
3572    #[inline]
3573    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_BLOCK }
3574    #[inline]
3575    fn cast(syntax: SyntaxNode) -> Option<Self> {
3576        if Self::can_cast(syntax.kind()) {
3577            Some(Self { syntax })
3578        } else {
3579            None
3580        }
3581    }
3582    #[inline]
3583    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3584}
3585impl hash::Hash for ExternBlock {
3586    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3587}
3588impl Eq for ExternBlock {}
3589impl PartialEq for ExternBlock {
3590    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3591}
3592impl Clone for ExternBlock {
3593    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3594}
3595impl fmt::Debug for ExternBlock {
3596    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3597        f.debug_struct("ExternBlock").field("syntax", &self.syntax).finish()
3598    }
3599}
3600impl AstNode for ExternCrate {
3601    #[inline]
3602    fn kind() -> SyntaxKind
3603    where
3604        Self: Sized,
3605    {
3606        EXTERN_CRATE
3607    }
3608    #[inline]
3609    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_CRATE }
3610    #[inline]
3611    fn cast(syntax: SyntaxNode) -> Option<Self> {
3612        if Self::can_cast(syntax.kind()) {
3613            Some(Self { syntax })
3614        } else {
3615            None
3616        }
3617    }
3618    #[inline]
3619    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3620}
3621impl hash::Hash for ExternCrate {
3622    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3623}
3624impl Eq for ExternCrate {}
3625impl PartialEq for ExternCrate {
3626    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3627}
3628impl Clone for ExternCrate {
3629    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3630}
3631impl fmt::Debug for ExternCrate {
3632    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3633        f.debug_struct("ExternCrate").field("syntax", &self.syntax).finish()
3634    }
3635}
3636impl AstNode for ExternItemList {
3637    #[inline]
3638    fn kind() -> SyntaxKind
3639    where
3640        Self: Sized,
3641    {
3642        EXTERN_ITEM_LIST
3643    }
3644    #[inline]
3645    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST }
3646    #[inline]
3647    fn cast(syntax: SyntaxNode) -> Option<Self> {
3648        if Self::can_cast(syntax.kind()) {
3649            Some(Self { syntax })
3650        } else {
3651            None
3652        }
3653    }
3654    #[inline]
3655    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3656}
3657impl hash::Hash for ExternItemList {
3658    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3659}
3660impl Eq for ExternItemList {}
3661impl PartialEq for ExternItemList {
3662    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3663}
3664impl Clone for ExternItemList {
3665    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3666}
3667impl fmt::Debug for ExternItemList {
3668    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3669        f.debug_struct("ExternItemList").field("syntax", &self.syntax).finish()
3670    }
3671}
3672impl AstNode for FieldExpr {
3673    #[inline]
3674    fn kind() -> SyntaxKind
3675    where
3676        Self: Sized,
3677    {
3678        FIELD_EXPR
3679    }
3680    #[inline]
3681    fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR }
3682    #[inline]
3683    fn cast(syntax: SyntaxNode) -> Option<Self> {
3684        if Self::can_cast(syntax.kind()) {
3685            Some(Self { syntax })
3686        } else {
3687            None
3688        }
3689    }
3690    #[inline]
3691    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3692}
3693impl hash::Hash for FieldExpr {
3694    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3695}
3696impl Eq for FieldExpr {}
3697impl PartialEq for FieldExpr {
3698    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3699}
3700impl Clone for FieldExpr {
3701    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3702}
3703impl fmt::Debug for FieldExpr {
3704    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3705        f.debug_struct("FieldExpr").field("syntax", &self.syntax).finish()
3706    }
3707}
3708impl AstNode for Fn {
3709    #[inline]
3710    fn kind() -> SyntaxKind
3711    where
3712        Self: Sized,
3713    {
3714        FN
3715    }
3716    #[inline]
3717    fn can_cast(kind: SyntaxKind) -> bool { kind == FN }
3718    #[inline]
3719    fn cast(syntax: SyntaxNode) -> Option<Self> {
3720        if Self::can_cast(syntax.kind()) {
3721            Some(Self { syntax })
3722        } else {
3723            None
3724        }
3725    }
3726    #[inline]
3727    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3728}
3729impl hash::Hash for Fn {
3730    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3731}
3732impl Eq for Fn {}
3733impl PartialEq for Fn {
3734    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3735}
3736impl Clone for Fn {
3737    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3738}
3739impl fmt::Debug for Fn {
3740    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3741        f.debug_struct("Fn").field("syntax", &self.syntax).finish()
3742    }
3743}
3744impl AstNode for FnPtrType {
3745    #[inline]
3746    fn kind() -> SyntaxKind
3747    where
3748        Self: Sized,
3749    {
3750        FN_PTR_TYPE
3751    }
3752    #[inline]
3753    fn can_cast(kind: SyntaxKind) -> bool { kind == FN_PTR_TYPE }
3754    #[inline]
3755    fn cast(syntax: SyntaxNode) -> Option<Self> {
3756        if Self::can_cast(syntax.kind()) {
3757            Some(Self { syntax })
3758        } else {
3759            None
3760        }
3761    }
3762    #[inline]
3763    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3764}
3765impl hash::Hash for FnPtrType {
3766    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3767}
3768impl Eq for FnPtrType {}
3769impl PartialEq for FnPtrType {
3770    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3771}
3772impl Clone for FnPtrType {
3773    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3774}
3775impl fmt::Debug for FnPtrType {
3776    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3777        f.debug_struct("FnPtrType").field("syntax", &self.syntax).finish()
3778    }
3779}
3780impl AstNode for ForBinder {
3781    #[inline]
3782    fn kind() -> SyntaxKind
3783    where
3784        Self: Sized,
3785    {
3786        FOR_BINDER
3787    }
3788    #[inline]
3789    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_BINDER }
3790    #[inline]
3791    fn cast(syntax: SyntaxNode) -> Option<Self> {
3792        if Self::can_cast(syntax.kind()) {
3793            Some(Self { syntax })
3794        } else {
3795            None
3796        }
3797    }
3798    #[inline]
3799    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3800}
3801impl hash::Hash for ForBinder {
3802    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3803}
3804impl Eq for ForBinder {}
3805impl PartialEq for ForBinder {
3806    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3807}
3808impl Clone for ForBinder {
3809    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3810}
3811impl fmt::Debug for ForBinder {
3812    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3813        f.debug_struct("ForBinder").field("syntax", &self.syntax).finish()
3814    }
3815}
3816impl AstNode for ForExpr {
3817    #[inline]
3818    fn kind() -> SyntaxKind
3819    where
3820        Self: Sized,
3821    {
3822        FOR_EXPR
3823    }
3824    #[inline]
3825    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR }
3826    #[inline]
3827    fn cast(syntax: SyntaxNode) -> Option<Self> {
3828        if Self::can_cast(syntax.kind()) {
3829            Some(Self { syntax })
3830        } else {
3831            None
3832        }
3833    }
3834    #[inline]
3835    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3836}
3837impl hash::Hash for ForExpr {
3838    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3839}
3840impl Eq for ForExpr {}
3841impl PartialEq for ForExpr {
3842    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3843}
3844impl Clone for ForExpr {
3845    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3846}
3847impl fmt::Debug for ForExpr {
3848    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3849        f.debug_struct("ForExpr").field("syntax", &self.syntax).finish()
3850    }
3851}
3852impl AstNode for ForType {
3853    #[inline]
3854    fn kind() -> SyntaxKind
3855    where
3856        Self: Sized,
3857    {
3858        FOR_TYPE
3859    }
3860    #[inline]
3861    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE }
3862    #[inline]
3863    fn cast(syntax: SyntaxNode) -> Option<Self> {
3864        if Self::can_cast(syntax.kind()) {
3865            Some(Self { syntax })
3866        } else {
3867            None
3868        }
3869    }
3870    #[inline]
3871    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3872}
3873impl hash::Hash for ForType {
3874    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3875}
3876impl Eq for ForType {}
3877impl PartialEq for ForType {
3878    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3879}
3880impl Clone for ForType {
3881    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3882}
3883impl fmt::Debug for ForType {
3884    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3885        f.debug_struct("ForType").field("syntax", &self.syntax).finish()
3886    }
3887}
3888impl AstNode for FormatArgsArg {
3889    #[inline]
3890    fn kind() -> SyntaxKind
3891    where
3892        Self: Sized,
3893    {
3894        FORMAT_ARGS_ARG
3895    }
3896    #[inline]
3897    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_ARG }
3898    #[inline]
3899    fn cast(syntax: SyntaxNode) -> Option<Self> {
3900        if Self::can_cast(syntax.kind()) {
3901            Some(Self { syntax })
3902        } else {
3903            None
3904        }
3905    }
3906    #[inline]
3907    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3908}
3909impl hash::Hash for FormatArgsArg {
3910    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3911}
3912impl Eq for FormatArgsArg {}
3913impl PartialEq for FormatArgsArg {
3914    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3915}
3916impl Clone for FormatArgsArg {
3917    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3918}
3919impl fmt::Debug for FormatArgsArg {
3920    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3921        f.debug_struct("FormatArgsArg").field("syntax", &self.syntax).finish()
3922    }
3923}
3924impl AstNode for FormatArgsExpr {
3925    #[inline]
3926    fn kind() -> SyntaxKind
3927    where
3928        Self: Sized,
3929    {
3930        FORMAT_ARGS_EXPR
3931    }
3932    #[inline]
3933    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_EXPR }
3934    #[inline]
3935    fn cast(syntax: SyntaxNode) -> Option<Self> {
3936        if Self::can_cast(syntax.kind()) {
3937            Some(Self { syntax })
3938        } else {
3939            None
3940        }
3941    }
3942    #[inline]
3943    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3944}
3945impl hash::Hash for FormatArgsExpr {
3946    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3947}
3948impl Eq for FormatArgsExpr {}
3949impl PartialEq for FormatArgsExpr {
3950    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3951}
3952impl Clone for FormatArgsExpr {
3953    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3954}
3955impl fmt::Debug for FormatArgsExpr {
3956    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3957        f.debug_struct("FormatArgsExpr").field("syntax", &self.syntax).finish()
3958    }
3959}
3960impl AstNode for GenericArgList {
3961    #[inline]
3962    fn kind() -> SyntaxKind
3963    where
3964        Self: Sized,
3965    {
3966        GENERIC_ARG_LIST
3967    }
3968    #[inline]
3969    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_ARG_LIST }
3970    #[inline]
3971    fn cast(syntax: SyntaxNode) -> Option<Self> {
3972        if Self::can_cast(syntax.kind()) {
3973            Some(Self { syntax })
3974        } else {
3975            None
3976        }
3977    }
3978    #[inline]
3979    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3980}
3981impl hash::Hash for GenericArgList {
3982    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3983}
3984impl Eq for GenericArgList {}
3985impl PartialEq for GenericArgList {
3986    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3987}
3988impl Clone for GenericArgList {
3989    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3990}
3991impl fmt::Debug for GenericArgList {
3992    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3993        f.debug_struct("GenericArgList").field("syntax", &self.syntax).finish()
3994    }
3995}
3996impl AstNode for GenericParamList {
3997    #[inline]
3998    fn kind() -> SyntaxKind
3999    where
4000        Self: Sized,
4001    {
4002        GENERIC_PARAM_LIST
4003    }
4004    #[inline]
4005    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST }
4006    #[inline]
4007    fn cast(syntax: SyntaxNode) -> Option<Self> {
4008        if Self::can_cast(syntax.kind()) {
4009            Some(Self { syntax })
4010        } else {
4011            None
4012        }
4013    }
4014    #[inline]
4015    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4016}
4017impl hash::Hash for GenericParamList {
4018    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4019}
4020impl Eq for GenericParamList {}
4021impl PartialEq for GenericParamList {
4022    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4023}
4024impl Clone for GenericParamList {
4025    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4026}
4027impl fmt::Debug for GenericParamList {
4028    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4029        f.debug_struct("GenericParamList").field("syntax", &self.syntax).finish()
4030    }
4031}
4032impl AstNode for IdentPat {
4033    #[inline]
4034    fn kind() -> SyntaxKind
4035    where
4036        Self: Sized,
4037    {
4038        IDENT_PAT
4039    }
4040    #[inline]
4041    fn can_cast(kind: SyntaxKind) -> bool { kind == IDENT_PAT }
4042    #[inline]
4043    fn cast(syntax: SyntaxNode) -> Option<Self> {
4044        if Self::can_cast(syntax.kind()) {
4045            Some(Self { syntax })
4046        } else {
4047            None
4048        }
4049    }
4050    #[inline]
4051    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4052}
4053impl hash::Hash for IdentPat {
4054    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4055}
4056impl Eq for IdentPat {}
4057impl PartialEq for IdentPat {
4058    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4059}
4060impl Clone for IdentPat {
4061    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4062}
4063impl fmt::Debug for IdentPat {
4064    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4065        f.debug_struct("IdentPat").field("syntax", &self.syntax).finish()
4066    }
4067}
4068impl AstNode for IfExpr {
4069    #[inline]
4070    fn kind() -> SyntaxKind
4071    where
4072        Self: Sized,
4073    {
4074        IF_EXPR
4075    }
4076    #[inline]
4077    fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR }
4078    #[inline]
4079    fn cast(syntax: SyntaxNode) -> Option<Self> {
4080        if Self::can_cast(syntax.kind()) {
4081            Some(Self { syntax })
4082        } else {
4083            None
4084        }
4085    }
4086    #[inline]
4087    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4088}
4089impl hash::Hash for IfExpr {
4090    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4091}
4092impl Eq for IfExpr {}
4093impl PartialEq for IfExpr {
4094    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4095}
4096impl Clone for IfExpr {
4097    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4098}
4099impl fmt::Debug for IfExpr {
4100    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4101        f.debug_struct("IfExpr").field("syntax", &self.syntax).finish()
4102    }
4103}
4104impl AstNode for Impl {
4105    #[inline]
4106    fn kind() -> SyntaxKind
4107    where
4108        Self: Sized,
4109    {
4110        IMPL
4111    }
4112    #[inline]
4113    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL }
4114    #[inline]
4115    fn cast(syntax: SyntaxNode) -> Option<Self> {
4116        if Self::can_cast(syntax.kind()) {
4117            Some(Self { syntax })
4118        } else {
4119            None
4120        }
4121    }
4122    #[inline]
4123    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4124}
4125impl hash::Hash for Impl {
4126    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4127}
4128impl Eq for Impl {}
4129impl PartialEq for Impl {
4130    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4131}
4132impl Clone for Impl {
4133    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4134}
4135impl fmt::Debug for Impl {
4136    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4137        f.debug_struct("Impl").field("syntax", &self.syntax).finish()
4138    }
4139}
4140impl AstNode for ImplTraitType {
4141    #[inline]
4142    fn kind() -> SyntaxKind
4143    where
4144        Self: Sized,
4145    {
4146        IMPL_TRAIT_TYPE
4147    }
4148    #[inline]
4149    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE }
4150    #[inline]
4151    fn cast(syntax: SyntaxNode) -> Option<Self> {
4152        if Self::can_cast(syntax.kind()) {
4153            Some(Self { syntax })
4154        } else {
4155            None
4156        }
4157    }
4158    #[inline]
4159    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4160}
4161impl hash::Hash for ImplTraitType {
4162    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4163}
4164impl Eq for ImplTraitType {}
4165impl PartialEq for ImplTraitType {
4166    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4167}
4168impl Clone for ImplTraitType {
4169    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4170}
4171impl fmt::Debug for ImplTraitType {
4172    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4173        f.debug_struct("ImplTraitType").field("syntax", &self.syntax).finish()
4174    }
4175}
4176impl AstNode for IndexExpr {
4177    #[inline]
4178    fn kind() -> SyntaxKind
4179    where
4180        Self: Sized,
4181    {
4182        INDEX_EXPR
4183    }
4184    #[inline]
4185    fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR }
4186    #[inline]
4187    fn cast(syntax: SyntaxNode) -> Option<Self> {
4188        if Self::can_cast(syntax.kind()) {
4189            Some(Self { syntax })
4190        } else {
4191            None
4192        }
4193    }
4194    #[inline]
4195    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4196}
4197impl hash::Hash for IndexExpr {
4198    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4199}
4200impl Eq for IndexExpr {}
4201impl PartialEq for IndexExpr {
4202    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4203}
4204impl Clone for IndexExpr {
4205    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4206}
4207impl fmt::Debug for IndexExpr {
4208    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4209        f.debug_struct("IndexExpr").field("syntax", &self.syntax).finish()
4210    }
4211}
4212impl AstNode for InferType {
4213    #[inline]
4214    fn kind() -> SyntaxKind
4215    where
4216        Self: Sized,
4217    {
4218        INFER_TYPE
4219    }
4220    #[inline]
4221    fn can_cast(kind: SyntaxKind) -> bool { kind == INFER_TYPE }
4222    #[inline]
4223    fn cast(syntax: SyntaxNode) -> Option<Self> {
4224        if Self::can_cast(syntax.kind()) {
4225            Some(Self { syntax })
4226        } else {
4227            None
4228        }
4229    }
4230    #[inline]
4231    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4232}
4233impl hash::Hash for InferType {
4234    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4235}
4236impl Eq for InferType {}
4237impl PartialEq for InferType {
4238    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4239}
4240impl Clone for InferType {
4241    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4242}
4243impl fmt::Debug for InferType {
4244    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4245        f.debug_struct("InferType").field("syntax", &self.syntax).finish()
4246    }
4247}
4248impl AstNode for ItemList {
4249    #[inline]
4250    fn kind() -> SyntaxKind
4251    where
4252        Self: Sized,
4253    {
4254        ITEM_LIST
4255    }
4256    #[inline]
4257    fn can_cast(kind: SyntaxKind) -> bool { kind == ITEM_LIST }
4258    #[inline]
4259    fn cast(syntax: SyntaxNode) -> Option<Self> {
4260        if Self::can_cast(syntax.kind()) {
4261            Some(Self { syntax })
4262        } else {
4263            None
4264        }
4265    }
4266    #[inline]
4267    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4268}
4269impl hash::Hash for ItemList {
4270    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4271}
4272impl Eq for ItemList {}
4273impl PartialEq for ItemList {
4274    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4275}
4276impl Clone for ItemList {
4277    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4278}
4279impl fmt::Debug for ItemList {
4280    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4281        f.debug_struct("ItemList").field("syntax", &self.syntax).finish()
4282    }
4283}
4284impl AstNode for Label {
4285    #[inline]
4286    fn kind() -> SyntaxKind
4287    where
4288        Self: Sized,
4289    {
4290        LABEL
4291    }
4292    #[inline]
4293    fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL }
4294    #[inline]
4295    fn cast(syntax: SyntaxNode) -> Option<Self> {
4296        if Self::can_cast(syntax.kind()) {
4297            Some(Self { syntax })
4298        } else {
4299            None
4300        }
4301    }
4302    #[inline]
4303    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4304}
4305impl hash::Hash for Label {
4306    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4307}
4308impl Eq for Label {}
4309impl PartialEq for Label {
4310    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4311}
4312impl Clone for Label {
4313    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4314}
4315impl fmt::Debug for Label {
4316    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4317        f.debug_struct("Label").field("syntax", &self.syntax).finish()
4318    }
4319}
4320impl AstNode for LetElse {
4321    #[inline]
4322    fn kind() -> SyntaxKind
4323    where
4324        Self: Sized,
4325    {
4326        LET_ELSE
4327    }
4328    #[inline]
4329    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_ELSE }
4330    #[inline]
4331    fn cast(syntax: SyntaxNode) -> Option<Self> {
4332        if Self::can_cast(syntax.kind()) {
4333            Some(Self { syntax })
4334        } else {
4335            None
4336        }
4337    }
4338    #[inline]
4339    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4340}
4341impl hash::Hash for LetElse {
4342    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4343}
4344impl Eq for LetElse {}
4345impl PartialEq for LetElse {
4346    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4347}
4348impl Clone for LetElse {
4349    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4350}
4351impl fmt::Debug for LetElse {
4352    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4353        f.debug_struct("LetElse").field("syntax", &self.syntax).finish()
4354    }
4355}
4356impl AstNode for LetExpr {
4357    #[inline]
4358    fn kind() -> SyntaxKind
4359    where
4360        Self: Sized,
4361    {
4362        LET_EXPR
4363    }
4364    #[inline]
4365    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_EXPR }
4366    #[inline]
4367    fn cast(syntax: SyntaxNode) -> Option<Self> {
4368        if Self::can_cast(syntax.kind()) {
4369            Some(Self { syntax })
4370        } else {
4371            None
4372        }
4373    }
4374    #[inline]
4375    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4376}
4377impl hash::Hash for LetExpr {
4378    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4379}
4380impl Eq for LetExpr {}
4381impl PartialEq for LetExpr {
4382    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4383}
4384impl Clone for LetExpr {
4385    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4386}
4387impl fmt::Debug for LetExpr {
4388    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4389        f.debug_struct("LetExpr").field("syntax", &self.syntax).finish()
4390    }
4391}
4392impl AstNode for LetStmt {
4393    #[inline]
4394    fn kind() -> SyntaxKind
4395    where
4396        Self: Sized,
4397    {
4398        LET_STMT
4399    }
4400    #[inline]
4401    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT }
4402    #[inline]
4403    fn cast(syntax: SyntaxNode) -> Option<Self> {
4404        if Self::can_cast(syntax.kind()) {
4405            Some(Self { syntax })
4406        } else {
4407            None
4408        }
4409    }
4410    #[inline]
4411    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4412}
4413impl hash::Hash for LetStmt {
4414    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4415}
4416impl Eq for LetStmt {}
4417impl PartialEq for LetStmt {
4418    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4419}
4420impl Clone for LetStmt {
4421    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4422}
4423impl fmt::Debug for LetStmt {
4424    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4425        f.debug_struct("LetStmt").field("syntax", &self.syntax).finish()
4426    }
4427}
4428impl AstNode for Lifetime {
4429    #[inline]
4430    fn kind() -> SyntaxKind
4431    where
4432        Self: Sized,
4433    {
4434        LIFETIME
4435    }
4436    #[inline]
4437    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME }
4438    #[inline]
4439    fn cast(syntax: SyntaxNode) -> Option<Self> {
4440        if Self::can_cast(syntax.kind()) {
4441            Some(Self { syntax })
4442        } else {
4443            None
4444        }
4445    }
4446    #[inline]
4447    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4448}
4449impl hash::Hash for Lifetime {
4450    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4451}
4452impl Eq for Lifetime {}
4453impl PartialEq for Lifetime {
4454    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4455}
4456impl Clone for Lifetime {
4457    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4458}
4459impl fmt::Debug for Lifetime {
4460    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4461        f.debug_struct("Lifetime").field("syntax", &self.syntax).finish()
4462    }
4463}
4464impl AstNode for LifetimeArg {
4465    #[inline]
4466    fn kind() -> SyntaxKind
4467    where
4468        Self: Sized,
4469    {
4470        LIFETIME_ARG
4471    }
4472    #[inline]
4473    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_ARG }
4474    #[inline]
4475    fn cast(syntax: SyntaxNode) -> Option<Self> {
4476        if Self::can_cast(syntax.kind()) {
4477            Some(Self { syntax })
4478        } else {
4479            None
4480        }
4481    }
4482    #[inline]
4483    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4484}
4485impl hash::Hash for LifetimeArg {
4486    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4487}
4488impl Eq for LifetimeArg {}
4489impl PartialEq for LifetimeArg {
4490    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4491}
4492impl Clone for LifetimeArg {
4493    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4494}
4495impl fmt::Debug for LifetimeArg {
4496    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4497        f.debug_struct("LifetimeArg").field("syntax", &self.syntax).finish()
4498    }
4499}
4500impl AstNode for LifetimeParam {
4501    #[inline]
4502    fn kind() -> SyntaxKind
4503    where
4504        Self: Sized,
4505    {
4506        LIFETIME_PARAM
4507    }
4508    #[inline]
4509    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM }
4510    #[inline]
4511    fn cast(syntax: SyntaxNode) -> Option<Self> {
4512        if Self::can_cast(syntax.kind()) {
4513            Some(Self { syntax })
4514        } else {
4515            None
4516        }
4517    }
4518    #[inline]
4519    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4520}
4521impl hash::Hash for LifetimeParam {
4522    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4523}
4524impl Eq for LifetimeParam {}
4525impl PartialEq for LifetimeParam {
4526    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4527}
4528impl Clone for LifetimeParam {
4529    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4530}
4531impl fmt::Debug for LifetimeParam {
4532    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4533        f.debug_struct("LifetimeParam").field("syntax", &self.syntax).finish()
4534    }
4535}
4536impl AstNode for Literal {
4537    #[inline]
4538    fn kind() -> SyntaxKind
4539    where
4540        Self: Sized,
4541    {
4542        LITERAL
4543    }
4544    #[inline]
4545    fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL }
4546    #[inline]
4547    fn cast(syntax: SyntaxNode) -> Option<Self> {
4548        if Self::can_cast(syntax.kind()) {
4549            Some(Self { syntax })
4550        } else {
4551            None
4552        }
4553    }
4554    #[inline]
4555    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4556}
4557impl hash::Hash for Literal {
4558    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4559}
4560impl Eq for Literal {}
4561impl PartialEq for Literal {
4562    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4563}
4564impl Clone for Literal {
4565    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4566}
4567impl fmt::Debug for Literal {
4568    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4569        f.debug_struct("Literal").field("syntax", &self.syntax).finish()
4570    }
4571}
4572impl AstNode for LiteralPat {
4573    #[inline]
4574    fn kind() -> SyntaxKind
4575    where
4576        Self: Sized,
4577    {
4578        LITERAL_PAT
4579    }
4580    #[inline]
4581    fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL_PAT }
4582    #[inline]
4583    fn cast(syntax: SyntaxNode) -> Option<Self> {
4584        if Self::can_cast(syntax.kind()) {
4585            Some(Self { syntax })
4586        } else {
4587            None
4588        }
4589    }
4590    #[inline]
4591    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4592}
4593impl hash::Hash for LiteralPat {
4594    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4595}
4596impl Eq for LiteralPat {}
4597impl PartialEq for LiteralPat {
4598    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4599}
4600impl Clone for LiteralPat {
4601    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4602}
4603impl fmt::Debug for LiteralPat {
4604    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4605        f.debug_struct("LiteralPat").field("syntax", &self.syntax).finish()
4606    }
4607}
4608impl AstNode for LoopExpr {
4609    #[inline]
4610    fn kind() -> SyntaxKind
4611    where
4612        Self: Sized,
4613    {
4614        LOOP_EXPR
4615    }
4616    #[inline]
4617    fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR }
4618    #[inline]
4619    fn cast(syntax: SyntaxNode) -> Option<Self> {
4620        if Self::can_cast(syntax.kind()) {
4621            Some(Self { syntax })
4622        } else {
4623            None
4624        }
4625    }
4626    #[inline]
4627    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4628}
4629impl hash::Hash for LoopExpr {
4630    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4631}
4632impl Eq for LoopExpr {}
4633impl PartialEq for LoopExpr {
4634    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4635}
4636impl Clone for LoopExpr {
4637    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4638}
4639impl fmt::Debug for LoopExpr {
4640    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4641        f.debug_struct("LoopExpr").field("syntax", &self.syntax).finish()
4642    }
4643}
4644impl AstNode for MacroCall {
4645    #[inline]
4646    fn kind() -> SyntaxKind
4647    where
4648        Self: Sized,
4649    {
4650        MACRO_CALL
4651    }
4652    #[inline]
4653    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_CALL }
4654    #[inline]
4655    fn cast(syntax: SyntaxNode) -> Option<Self> {
4656        if Self::can_cast(syntax.kind()) {
4657            Some(Self { syntax })
4658        } else {
4659            None
4660        }
4661    }
4662    #[inline]
4663    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4664}
4665impl hash::Hash for MacroCall {
4666    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4667}
4668impl Eq for MacroCall {}
4669impl PartialEq for MacroCall {
4670    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4671}
4672impl Clone for MacroCall {
4673    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4674}
4675impl fmt::Debug for MacroCall {
4676    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4677        f.debug_struct("MacroCall").field("syntax", &self.syntax).finish()
4678    }
4679}
4680impl AstNode for MacroDef {
4681    #[inline]
4682    fn kind() -> SyntaxKind
4683    where
4684        Self: Sized,
4685    {
4686        MACRO_DEF
4687    }
4688    #[inline]
4689    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF }
4690    #[inline]
4691    fn cast(syntax: SyntaxNode) -> Option<Self> {
4692        if Self::can_cast(syntax.kind()) {
4693            Some(Self { syntax })
4694        } else {
4695            None
4696        }
4697    }
4698    #[inline]
4699    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4700}
4701impl hash::Hash for MacroDef {
4702    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4703}
4704impl Eq for MacroDef {}
4705impl PartialEq for MacroDef {
4706    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4707}
4708impl Clone for MacroDef {
4709    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4710}
4711impl fmt::Debug for MacroDef {
4712    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4713        f.debug_struct("MacroDef").field("syntax", &self.syntax).finish()
4714    }
4715}
4716impl AstNode for MacroExpr {
4717    #[inline]
4718    fn kind() -> SyntaxKind
4719    where
4720        Self: Sized,
4721    {
4722        MACRO_EXPR
4723    }
4724    #[inline]
4725    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_EXPR }
4726    #[inline]
4727    fn cast(syntax: SyntaxNode) -> Option<Self> {
4728        if Self::can_cast(syntax.kind()) {
4729            Some(Self { syntax })
4730        } else {
4731            None
4732        }
4733    }
4734    #[inline]
4735    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4736}
4737impl hash::Hash for MacroExpr {
4738    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4739}
4740impl Eq for MacroExpr {}
4741impl PartialEq for MacroExpr {
4742    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4743}
4744impl Clone for MacroExpr {
4745    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4746}
4747impl fmt::Debug for MacroExpr {
4748    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4749        f.debug_struct("MacroExpr").field("syntax", &self.syntax).finish()
4750    }
4751}
4752impl AstNode for MacroItems {
4753    #[inline]
4754    fn kind() -> SyntaxKind
4755    where
4756        Self: Sized,
4757    {
4758        MACRO_ITEMS
4759    }
4760    #[inline]
4761    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
4762    #[inline]
4763    fn cast(syntax: SyntaxNode) -> Option<Self> {
4764        if Self::can_cast(syntax.kind()) {
4765            Some(Self { syntax })
4766        } else {
4767            None
4768        }
4769    }
4770    #[inline]
4771    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4772}
4773impl hash::Hash for MacroItems {
4774    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4775}
4776impl Eq for MacroItems {}
4777impl PartialEq for MacroItems {
4778    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4779}
4780impl Clone for MacroItems {
4781    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4782}
4783impl fmt::Debug for MacroItems {
4784    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4785        f.debug_struct("MacroItems").field("syntax", &self.syntax).finish()
4786    }
4787}
4788impl AstNode for MacroPat {
4789    #[inline]
4790    fn kind() -> SyntaxKind
4791    where
4792        Self: Sized,
4793    {
4794        MACRO_PAT
4795    }
4796    #[inline]
4797    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_PAT }
4798    #[inline]
4799    fn cast(syntax: SyntaxNode) -> Option<Self> {
4800        if Self::can_cast(syntax.kind()) {
4801            Some(Self { syntax })
4802        } else {
4803            None
4804        }
4805    }
4806    #[inline]
4807    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4808}
4809impl hash::Hash for MacroPat {
4810    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4811}
4812impl Eq for MacroPat {}
4813impl PartialEq for MacroPat {
4814    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4815}
4816impl Clone for MacroPat {
4817    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4818}
4819impl fmt::Debug for MacroPat {
4820    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4821        f.debug_struct("MacroPat").field("syntax", &self.syntax).finish()
4822    }
4823}
4824impl AstNode for MacroRules {
4825    #[inline]
4826    fn kind() -> SyntaxKind
4827    where
4828        Self: Sized,
4829    {
4830        MACRO_RULES
4831    }
4832    #[inline]
4833    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_RULES }
4834    #[inline]
4835    fn cast(syntax: SyntaxNode) -> Option<Self> {
4836        if Self::can_cast(syntax.kind()) {
4837            Some(Self { syntax })
4838        } else {
4839            None
4840        }
4841    }
4842    #[inline]
4843    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4844}
4845impl hash::Hash for MacroRules {
4846    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4847}
4848impl Eq for MacroRules {}
4849impl PartialEq for MacroRules {
4850    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4851}
4852impl Clone for MacroRules {
4853    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4854}
4855impl fmt::Debug for MacroRules {
4856    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4857        f.debug_struct("MacroRules").field("syntax", &self.syntax).finish()
4858    }
4859}
4860impl AstNode for MacroStmts {
4861    #[inline]
4862    fn kind() -> SyntaxKind
4863    where
4864        Self: Sized,
4865    {
4866        MACRO_STMTS
4867    }
4868    #[inline]
4869    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS }
4870    #[inline]
4871    fn cast(syntax: SyntaxNode) -> Option<Self> {
4872        if Self::can_cast(syntax.kind()) {
4873            Some(Self { syntax })
4874        } else {
4875            None
4876        }
4877    }
4878    #[inline]
4879    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4880}
4881impl hash::Hash for MacroStmts {
4882    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4883}
4884impl Eq for MacroStmts {}
4885impl PartialEq for MacroStmts {
4886    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4887}
4888impl Clone for MacroStmts {
4889    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4890}
4891impl fmt::Debug for MacroStmts {
4892    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4893        f.debug_struct("MacroStmts").field("syntax", &self.syntax).finish()
4894    }
4895}
4896impl AstNode for MacroType {
4897    #[inline]
4898    fn kind() -> SyntaxKind
4899    where
4900        Self: Sized,
4901    {
4902        MACRO_TYPE
4903    }
4904    #[inline]
4905    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_TYPE }
4906    #[inline]
4907    fn cast(syntax: SyntaxNode) -> Option<Self> {
4908        if Self::can_cast(syntax.kind()) {
4909            Some(Self { syntax })
4910        } else {
4911            None
4912        }
4913    }
4914    #[inline]
4915    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4916}
4917impl hash::Hash for MacroType {
4918    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4919}
4920impl Eq for MacroType {}
4921impl PartialEq for MacroType {
4922    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4923}
4924impl Clone for MacroType {
4925    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4926}
4927impl fmt::Debug for MacroType {
4928    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4929        f.debug_struct("MacroType").field("syntax", &self.syntax).finish()
4930    }
4931}
4932impl AstNode for MatchArm {
4933    #[inline]
4934    fn kind() -> SyntaxKind
4935    where
4936        Self: Sized,
4937    {
4938        MATCH_ARM
4939    }
4940    #[inline]
4941    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM }
4942    #[inline]
4943    fn cast(syntax: SyntaxNode) -> Option<Self> {
4944        if Self::can_cast(syntax.kind()) {
4945            Some(Self { syntax })
4946        } else {
4947            None
4948        }
4949    }
4950    #[inline]
4951    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4952}
4953impl hash::Hash for MatchArm {
4954    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4955}
4956impl Eq for MatchArm {}
4957impl PartialEq for MatchArm {
4958    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4959}
4960impl Clone for MatchArm {
4961    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4962}
4963impl fmt::Debug for MatchArm {
4964    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4965        f.debug_struct("MatchArm").field("syntax", &self.syntax).finish()
4966    }
4967}
4968impl AstNode for MatchArmList {
4969    #[inline]
4970    fn kind() -> SyntaxKind
4971    where
4972        Self: Sized,
4973    {
4974        MATCH_ARM_LIST
4975    }
4976    #[inline]
4977    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST }
4978    #[inline]
4979    fn cast(syntax: SyntaxNode) -> Option<Self> {
4980        if Self::can_cast(syntax.kind()) {
4981            Some(Self { syntax })
4982        } else {
4983            None
4984        }
4985    }
4986    #[inline]
4987    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4988}
4989impl hash::Hash for MatchArmList {
4990    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4991}
4992impl Eq for MatchArmList {}
4993impl PartialEq for MatchArmList {
4994    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4995}
4996impl Clone for MatchArmList {
4997    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4998}
4999impl fmt::Debug for MatchArmList {
5000    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5001        f.debug_struct("MatchArmList").field("syntax", &self.syntax).finish()
5002    }
5003}
5004impl AstNode for MatchExpr {
5005    #[inline]
5006    fn kind() -> SyntaxKind
5007    where
5008        Self: Sized,
5009    {
5010        MATCH_EXPR
5011    }
5012    #[inline]
5013    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR }
5014    #[inline]
5015    fn cast(syntax: SyntaxNode) -> Option<Self> {
5016        if Self::can_cast(syntax.kind()) {
5017            Some(Self { syntax })
5018        } else {
5019            None
5020        }
5021    }
5022    #[inline]
5023    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5024}
5025impl hash::Hash for MatchExpr {
5026    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5027}
5028impl Eq for MatchExpr {}
5029impl PartialEq for MatchExpr {
5030    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5031}
5032impl Clone for MatchExpr {
5033    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5034}
5035impl fmt::Debug for MatchExpr {
5036    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5037        f.debug_struct("MatchExpr").field("syntax", &self.syntax).finish()
5038    }
5039}
5040impl AstNode for MatchGuard {
5041    #[inline]
5042    fn kind() -> SyntaxKind
5043    where
5044        Self: Sized,
5045    {
5046        MATCH_GUARD
5047    }
5048    #[inline]
5049    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD }
5050    #[inline]
5051    fn cast(syntax: SyntaxNode) -> Option<Self> {
5052        if Self::can_cast(syntax.kind()) {
5053            Some(Self { syntax })
5054        } else {
5055            None
5056        }
5057    }
5058    #[inline]
5059    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5060}
5061impl hash::Hash for MatchGuard {
5062    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5063}
5064impl Eq for MatchGuard {}
5065impl PartialEq for MatchGuard {
5066    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5067}
5068impl Clone for MatchGuard {
5069    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5070}
5071impl fmt::Debug for MatchGuard {
5072    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5073        f.debug_struct("MatchGuard").field("syntax", &self.syntax).finish()
5074    }
5075}
5076impl AstNode for Meta {
5077    #[inline]
5078    fn kind() -> SyntaxKind
5079    where
5080        Self: Sized,
5081    {
5082        META
5083    }
5084    #[inline]
5085    fn can_cast(kind: SyntaxKind) -> bool { kind == META }
5086    #[inline]
5087    fn cast(syntax: SyntaxNode) -> Option<Self> {
5088        if Self::can_cast(syntax.kind()) {
5089            Some(Self { syntax })
5090        } else {
5091            None
5092        }
5093    }
5094    #[inline]
5095    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5096}
5097impl hash::Hash for Meta {
5098    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5099}
5100impl Eq for Meta {}
5101impl PartialEq for Meta {
5102    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5103}
5104impl Clone for Meta {
5105    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5106}
5107impl fmt::Debug for Meta {
5108    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5109        f.debug_struct("Meta").field("syntax", &self.syntax).finish()
5110    }
5111}
5112impl AstNode for MethodCallExpr {
5113    #[inline]
5114    fn kind() -> SyntaxKind
5115    where
5116        Self: Sized,
5117    {
5118        METHOD_CALL_EXPR
5119    }
5120    #[inline]
5121    fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR }
5122    #[inline]
5123    fn cast(syntax: SyntaxNode) -> Option<Self> {
5124        if Self::can_cast(syntax.kind()) {
5125            Some(Self { syntax })
5126        } else {
5127            None
5128        }
5129    }
5130    #[inline]
5131    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5132}
5133impl hash::Hash for MethodCallExpr {
5134    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5135}
5136impl Eq for MethodCallExpr {}
5137impl PartialEq for MethodCallExpr {
5138    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5139}
5140impl Clone for MethodCallExpr {
5141    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5142}
5143impl fmt::Debug for MethodCallExpr {
5144    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5145        f.debug_struct("MethodCallExpr").field("syntax", &self.syntax).finish()
5146    }
5147}
5148impl AstNode for Module {
5149    #[inline]
5150    fn kind() -> SyntaxKind
5151    where
5152        Self: Sized,
5153    {
5154        MODULE
5155    }
5156    #[inline]
5157    fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE }
5158    #[inline]
5159    fn cast(syntax: SyntaxNode) -> Option<Self> {
5160        if Self::can_cast(syntax.kind()) {
5161            Some(Self { syntax })
5162        } else {
5163            None
5164        }
5165    }
5166    #[inline]
5167    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5168}
5169impl hash::Hash for Module {
5170    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5171}
5172impl Eq for Module {}
5173impl PartialEq for Module {
5174    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5175}
5176impl Clone for Module {
5177    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5178}
5179impl fmt::Debug for Module {
5180    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5181        f.debug_struct("Module").field("syntax", &self.syntax).finish()
5182    }
5183}
5184impl AstNode for Name {
5185    #[inline]
5186    fn kind() -> SyntaxKind
5187    where
5188        Self: Sized,
5189    {
5190        NAME
5191    }
5192    #[inline]
5193    fn can_cast(kind: SyntaxKind) -> bool { kind == NAME }
5194    #[inline]
5195    fn cast(syntax: SyntaxNode) -> Option<Self> {
5196        if Self::can_cast(syntax.kind()) {
5197            Some(Self { syntax })
5198        } else {
5199            None
5200        }
5201    }
5202    #[inline]
5203    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5204}
5205impl hash::Hash for Name {
5206    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5207}
5208impl Eq for Name {}
5209impl PartialEq for Name {
5210    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5211}
5212impl Clone for Name {
5213    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5214}
5215impl fmt::Debug for Name {
5216    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5217        f.debug_struct("Name").field("syntax", &self.syntax).finish()
5218    }
5219}
5220impl AstNode for NameRef {
5221    #[inline]
5222    fn kind() -> SyntaxKind
5223    where
5224        Self: Sized,
5225    {
5226        NAME_REF
5227    }
5228    #[inline]
5229    fn can_cast(kind: SyntaxKind) -> bool { kind == NAME_REF }
5230    #[inline]
5231    fn cast(syntax: SyntaxNode) -> Option<Self> {
5232        if Self::can_cast(syntax.kind()) {
5233            Some(Self { syntax })
5234        } else {
5235            None
5236        }
5237    }
5238    #[inline]
5239    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5240}
5241impl hash::Hash for NameRef {
5242    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5243}
5244impl Eq for NameRef {}
5245impl PartialEq for NameRef {
5246    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5247}
5248impl Clone for NameRef {
5249    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5250}
5251impl fmt::Debug for NameRef {
5252    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5253        f.debug_struct("NameRef").field("syntax", &self.syntax).finish()
5254    }
5255}
5256impl AstNode for NeverType {
5257    #[inline]
5258    fn kind() -> SyntaxKind
5259    where
5260        Self: Sized,
5261    {
5262        NEVER_TYPE
5263    }
5264    #[inline]
5265    fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE }
5266    #[inline]
5267    fn cast(syntax: SyntaxNode) -> Option<Self> {
5268        if Self::can_cast(syntax.kind()) {
5269            Some(Self { syntax })
5270        } else {
5271            None
5272        }
5273    }
5274    #[inline]
5275    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5276}
5277impl hash::Hash for NeverType {
5278    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5279}
5280impl Eq for NeverType {}
5281impl PartialEq for NeverType {
5282    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5283}
5284impl Clone for NeverType {
5285    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5286}
5287impl fmt::Debug for NeverType {
5288    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5289        f.debug_struct("NeverType").field("syntax", &self.syntax).finish()
5290    }
5291}
5292impl AstNode for OffsetOfExpr {
5293    #[inline]
5294    fn kind() -> SyntaxKind
5295    where
5296        Self: Sized,
5297    {
5298        OFFSET_OF_EXPR
5299    }
5300    #[inline]
5301    fn can_cast(kind: SyntaxKind) -> bool { kind == OFFSET_OF_EXPR }
5302    #[inline]
5303    fn cast(syntax: SyntaxNode) -> Option<Self> {
5304        if Self::can_cast(syntax.kind()) {
5305            Some(Self { syntax })
5306        } else {
5307            None
5308        }
5309    }
5310    #[inline]
5311    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5312}
5313impl hash::Hash for OffsetOfExpr {
5314    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5315}
5316impl Eq for OffsetOfExpr {}
5317impl PartialEq for OffsetOfExpr {
5318    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5319}
5320impl Clone for OffsetOfExpr {
5321    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5322}
5323impl fmt::Debug for OffsetOfExpr {
5324    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5325        f.debug_struct("OffsetOfExpr").field("syntax", &self.syntax).finish()
5326    }
5327}
5328impl AstNode for OrPat {
5329    #[inline]
5330    fn kind() -> SyntaxKind
5331    where
5332        Self: Sized,
5333    {
5334        OR_PAT
5335    }
5336    #[inline]
5337    fn can_cast(kind: SyntaxKind) -> bool { kind == OR_PAT }
5338    #[inline]
5339    fn cast(syntax: SyntaxNode) -> Option<Self> {
5340        if Self::can_cast(syntax.kind()) {
5341            Some(Self { syntax })
5342        } else {
5343            None
5344        }
5345    }
5346    #[inline]
5347    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5348}
5349impl hash::Hash for OrPat {
5350    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5351}
5352impl Eq for OrPat {}
5353impl PartialEq for OrPat {
5354    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5355}
5356impl Clone for OrPat {
5357    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5358}
5359impl fmt::Debug for OrPat {
5360    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5361        f.debug_struct("OrPat").field("syntax", &self.syntax).finish()
5362    }
5363}
5364impl AstNode for Param {
5365    #[inline]
5366    fn kind() -> SyntaxKind
5367    where
5368        Self: Sized,
5369    {
5370        PARAM
5371    }
5372    #[inline]
5373    fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM }
5374    #[inline]
5375    fn cast(syntax: SyntaxNode) -> Option<Self> {
5376        if Self::can_cast(syntax.kind()) {
5377            Some(Self { syntax })
5378        } else {
5379            None
5380        }
5381    }
5382    #[inline]
5383    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5384}
5385impl hash::Hash for Param {
5386    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5387}
5388impl Eq for Param {}
5389impl PartialEq for Param {
5390    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5391}
5392impl Clone for Param {
5393    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5394}
5395impl fmt::Debug for Param {
5396    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5397        f.debug_struct("Param").field("syntax", &self.syntax).finish()
5398    }
5399}
5400impl AstNode for ParamList {
5401    #[inline]
5402    fn kind() -> SyntaxKind
5403    where
5404        Self: Sized,
5405    {
5406        PARAM_LIST
5407    }
5408    #[inline]
5409    fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM_LIST }
5410    #[inline]
5411    fn cast(syntax: SyntaxNode) -> Option<Self> {
5412        if Self::can_cast(syntax.kind()) {
5413            Some(Self { syntax })
5414        } else {
5415            None
5416        }
5417    }
5418    #[inline]
5419    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5420}
5421impl hash::Hash for ParamList {
5422    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5423}
5424impl Eq for ParamList {}
5425impl PartialEq for ParamList {
5426    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5427}
5428impl Clone for ParamList {
5429    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5430}
5431impl fmt::Debug for ParamList {
5432    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5433        f.debug_struct("ParamList").field("syntax", &self.syntax).finish()
5434    }
5435}
5436impl AstNode for ParenExpr {
5437    #[inline]
5438    fn kind() -> SyntaxKind
5439    where
5440        Self: Sized,
5441    {
5442        PAREN_EXPR
5443    }
5444    #[inline]
5445    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR }
5446    #[inline]
5447    fn cast(syntax: SyntaxNode) -> Option<Self> {
5448        if Self::can_cast(syntax.kind()) {
5449            Some(Self { syntax })
5450        } else {
5451            None
5452        }
5453    }
5454    #[inline]
5455    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5456}
5457impl hash::Hash for ParenExpr {
5458    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5459}
5460impl Eq for ParenExpr {}
5461impl PartialEq for ParenExpr {
5462    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5463}
5464impl Clone for ParenExpr {
5465    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5466}
5467impl fmt::Debug for ParenExpr {
5468    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5469        f.debug_struct("ParenExpr").field("syntax", &self.syntax).finish()
5470    }
5471}
5472impl AstNode for ParenPat {
5473    #[inline]
5474    fn kind() -> SyntaxKind
5475    where
5476        Self: Sized,
5477    {
5478        PAREN_PAT
5479    }
5480    #[inline]
5481    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_PAT }
5482    #[inline]
5483    fn cast(syntax: SyntaxNode) -> Option<Self> {
5484        if Self::can_cast(syntax.kind()) {
5485            Some(Self { syntax })
5486        } else {
5487            None
5488        }
5489    }
5490    #[inline]
5491    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5492}
5493impl hash::Hash for ParenPat {
5494    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5495}
5496impl Eq for ParenPat {}
5497impl PartialEq for ParenPat {
5498    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5499}
5500impl Clone for ParenPat {
5501    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5502}
5503impl fmt::Debug for ParenPat {
5504    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5505        f.debug_struct("ParenPat").field("syntax", &self.syntax).finish()
5506    }
5507}
5508impl AstNode for ParenType {
5509    #[inline]
5510    fn kind() -> SyntaxKind
5511    where
5512        Self: Sized,
5513    {
5514        PAREN_TYPE
5515    }
5516    #[inline]
5517    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE }
5518    #[inline]
5519    fn cast(syntax: SyntaxNode) -> Option<Self> {
5520        if Self::can_cast(syntax.kind()) {
5521            Some(Self { syntax })
5522        } else {
5523            None
5524        }
5525    }
5526    #[inline]
5527    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5528}
5529impl hash::Hash for ParenType {
5530    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5531}
5532impl Eq for ParenType {}
5533impl PartialEq for ParenType {
5534    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5535}
5536impl Clone for ParenType {
5537    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5538}
5539impl fmt::Debug for ParenType {
5540    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5541        f.debug_struct("ParenType").field("syntax", &self.syntax).finish()
5542    }
5543}
5544impl AstNode for ParenthesizedArgList {
5545    #[inline]
5546    fn kind() -> SyntaxKind
5547    where
5548        Self: Sized,
5549    {
5550        PARENTHESIZED_ARG_LIST
5551    }
5552    #[inline]
5553    fn can_cast(kind: SyntaxKind) -> bool { kind == PARENTHESIZED_ARG_LIST }
5554    #[inline]
5555    fn cast(syntax: SyntaxNode) -> Option<Self> {
5556        if Self::can_cast(syntax.kind()) {
5557            Some(Self { syntax })
5558        } else {
5559            None
5560        }
5561    }
5562    #[inline]
5563    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5564}
5565impl hash::Hash for ParenthesizedArgList {
5566    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5567}
5568impl Eq for ParenthesizedArgList {}
5569impl PartialEq for ParenthesizedArgList {
5570    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5571}
5572impl Clone for ParenthesizedArgList {
5573    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5574}
5575impl fmt::Debug for ParenthesizedArgList {
5576    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5577        f.debug_struct("ParenthesizedArgList").field("syntax", &self.syntax).finish()
5578    }
5579}
5580impl AstNode for Path {
5581    #[inline]
5582    fn kind() -> SyntaxKind
5583    where
5584        Self: Sized,
5585    {
5586        PATH
5587    }
5588    #[inline]
5589    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH }
5590    #[inline]
5591    fn cast(syntax: SyntaxNode) -> Option<Self> {
5592        if Self::can_cast(syntax.kind()) {
5593            Some(Self { syntax })
5594        } else {
5595            None
5596        }
5597    }
5598    #[inline]
5599    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5600}
5601impl hash::Hash for Path {
5602    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5603}
5604impl Eq for Path {}
5605impl PartialEq for Path {
5606    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5607}
5608impl Clone for Path {
5609    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5610}
5611impl fmt::Debug for Path {
5612    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5613        f.debug_struct("Path").field("syntax", &self.syntax).finish()
5614    }
5615}
5616impl AstNode for PathExpr {
5617    #[inline]
5618    fn kind() -> SyntaxKind
5619    where
5620        Self: Sized,
5621    {
5622        PATH_EXPR
5623    }
5624    #[inline]
5625    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR }
5626    #[inline]
5627    fn cast(syntax: SyntaxNode) -> Option<Self> {
5628        if Self::can_cast(syntax.kind()) {
5629            Some(Self { syntax })
5630        } else {
5631            None
5632        }
5633    }
5634    #[inline]
5635    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5636}
5637impl hash::Hash for PathExpr {
5638    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5639}
5640impl Eq for PathExpr {}
5641impl PartialEq for PathExpr {
5642    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5643}
5644impl Clone for PathExpr {
5645    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5646}
5647impl fmt::Debug for PathExpr {
5648    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5649        f.debug_struct("PathExpr").field("syntax", &self.syntax).finish()
5650    }
5651}
5652impl AstNode for PathPat {
5653    #[inline]
5654    fn kind() -> SyntaxKind
5655    where
5656        Self: Sized,
5657    {
5658        PATH_PAT
5659    }
5660    #[inline]
5661    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_PAT }
5662    #[inline]
5663    fn cast(syntax: SyntaxNode) -> Option<Self> {
5664        if Self::can_cast(syntax.kind()) {
5665            Some(Self { syntax })
5666        } else {
5667            None
5668        }
5669    }
5670    #[inline]
5671    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5672}
5673impl hash::Hash for PathPat {
5674    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5675}
5676impl Eq for PathPat {}
5677impl PartialEq for PathPat {
5678    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5679}
5680impl Clone for PathPat {
5681    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5682}
5683impl fmt::Debug for PathPat {
5684    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5685        f.debug_struct("PathPat").field("syntax", &self.syntax).finish()
5686    }
5687}
5688impl AstNode for PathSegment {
5689    #[inline]
5690    fn kind() -> SyntaxKind
5691    where
5692        Self: Sized,
5693    {
5694        PATH_SEGMENT
5695    }
5696    #[inline]
5697    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT }
5698    #[inline]
5699    fn cast(syntax: SyntaxNode) -> Option<Self> {
5700        if Self::can_cast(syntax.kind()) {
5701            Some(Self { syntax })
5702        } else {
5703            None
5704        }
5705    }
5706    #[inline]
5707    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5708}
5709impl hash::Hash for PathSegment {
5710    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5711}
5712impl Eq for PathSegment {}
5713impl PartialEq for PathSegment {
5714    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5715}
5716impl Clone for PathSegment {
5717    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5718}
5719impl fmt::Debug for PathSegment {
5720    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5721        f.debug_struct("PathSegment").field("syntax", &self.syntax).finish()
5722    }
5723}
5724impl AstNode for PathType {
5725    #[inline]
5726    fn kind() -> SyntaxKind
5727    where
5728        Self: Sized,
5729    {
5730        PATH_TYPE
5731    }
5732    #[inline]
5733    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE }
5734    #[inline]
5735    fn cast(syntax: SyntaxNode) -> Option<Self> {
5736        if Self::can_cast(syntax.kind()) {
5737            Some(Self { syntax })
5738        } else {
5739            None
5740        }
5741    }
5742    #[inline]
5743    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5744}
5745impl hash::Hash for PathType {
5746    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5747}
5748impl Eq for PathType {}
5749impl PartialEq for PathType {
5750    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5751}
5752impl Clone for PathType {
5753    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5754}
5755impl fmt::Debug for PathType {
5756    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5757        f.debug_struct("PathType").field("syntax", &self.syntax).finish()
5758    }
5759}
5760impl AstNode for PrefixExpr {
5761    #[inline]
5762    fn kind() -> SyntaxKind
5763    where
5764        Self: Sized,
5765    {
5766        PREFIX_EXPR
5767    }
5768    #[inline]
5769    fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR }
5770    #[inline]
5771    fn cast(syntax: SyntaxNode) -> Option<Self> {
5772        if Self::can_cast(syntax.kind()) {
5773            Some(Self { syntax })
5774        } else {
5775            None
5776        }
5777    }
5778    #[inline]
5779    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5780}
5781impl hash::Hash for PrefixExpr {
5782    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5783}
5784impl Eq for PrefixExpr {}
5785impl PartialEq for PrefixExpr {
5786    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5787}
5788impl Clone for PrefixExpr {
5789    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5790}
5791impl fmt::Debug for PrefixExpr {
5792    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5793        f.debug_struct("PrefixExpr").field("syntax", &self.syntax).finish()
5794    }
5795}
5796impl AstNode for PtrType {
5797    #[inline]
5798    fn kind() -> SyntaxKind
5799    where
5800        Self: Sized,
5801    {
5802        PTR_TYPE
5803    }
5804    #[inline]
5805    fn can_cast(kind: SyntaxKind) -> bool { kind == PTR_TYPE }
5806    #[inline]
5807    fn cast(syntax: SyntaxNode) -> Option<Self> {
5808        if Self::can_cast(syntax.kind()) {
5809            Some(Self { syntax })
5810        } else {
5811            None
5812        }
5813    }
5814    #[inline]
5815    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5816}
5817impl hash::Hash for PtrType {
5818    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5819}
5820impl Eq for PtrType {}
5821impl PartialEq for PtrType {
5822    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5823}
5824impl Clone for PtrType {
5825    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5826}
5827impl fmt::Debug for PtrType {
5828    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5829        f.debug_struct("PtrType").field("syntax", &self.syntax).finish()
5830    }
5831}
5832impl AstNode for RangeExpr {
5833    #[inline]
5834    fn kind() -> SyntaxKind
5835    where
5836        Self: Sized,
5837    {
5838        RANGE_EXPR
5839    }
5840    #[inline]
5841    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR }
5842    #[inline]
5843    fn cast(syntax: SyntaxNode) -> Option<Self> {
5844        if Self::can_cast(syntax.kind()) {
5845            Some(Self { syntax })
5846        } else {
5847            None
5848        }
5849    }
5850    #[inline]
5851    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5852}
5853impl hash::Hash for RangeExpr {
5854    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5855}
5856impl Eq for RangeExpr {}
5857impl PartialEq for RangeExpr {
5858    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5859}
5860impl Clone for RangeExpr {
5861    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5862}
5863impl fmt::Debug for RangeExpr {
5864    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5865        f.debug_struct("RangeExpr").field("syntax", &self.syntax).finish()
5866    }
5867}
5868impl AstNode for RangePat {
5869    #[inline]
5870    fn kind() -> SyntaxKind
5871    where
5872        Self: Sized,
5873    {
5874        RANGE_PAT
5875    }
5876    #[inline]
5877    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_PAT }
5878    #[inline]
5879    fn cast(syntax: SyntaxNode) -> Option<Self> {
5880        if Self::can_cast(syntax.kind()) {
5881            Some(Self { syntax })
5882        } else {
5883            None
5884        }
5885    }
5886    #[inline]
5887    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5888}
5889impl hash::Hash for RangePat {
5890    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5891}
5892impl Eq for RangePat {}
5893impl PartialEq for RangePat {
5894    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5895}
5896impl Clone for RangePat {
5897    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5898}
5899impl fmt::Debug for RangePat {
5900    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5901        f.debug_struct("RangePat").field("syntax", &self.syntax).finish()
5902    }
5903}
5904impl AstNode for RecordExpr {
5905    #[inline]
5906    fn kind() -> SyntaxKind
5907    where
5908        Self: Sized,
5909    {
5910        RECORD_EXPR
5911    }
5912    #[inline]
5913    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR }
5914    #[inline]
5915    fn cast(syntax: SyntaxNode) -> Option<Self> {
5916        if Self::can_cast(syntax.kind()) {
5917            Some(Self { syntax })
5918        } else {
5919            None
5920        }
5921    }
5922    #[inline]
5923    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5924}
5925impl hash::Hash for RecordExpr {
5926    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5927}
5928impl Eq for RecordExpr {}
5929impl PartialEq for RecordExpr {
5930    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5931}
5932impl Clone for RecordExpr {
5933    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5934}
5935impl fmt::Debug for RecordExpr {
5936    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5937        f.debug_struct("RecordExpr").field("syntax", &self.syntax).finish()
5938    }
5939}
5940impl AstNode for RecordExprField {
5941    #[inline]
5942    fn kind() -> SyntaxKind
5943    where
5944        Self: Sized,
5945    {
5946        RECORD_EXPR_FIELD
5947    }
5948    #[inline]
5949    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD }
5950    #[inline]
5951    fn cast(syntax: SyntaxNode) -> Option<Self> {
5952        if Self::can_cast(syntax.kind()) {
5953            Some(Self { syntax })
5954        } else {
5955            None
5956        }
5957    }
5958    #[inline]
5959    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5960}
5961impl hash::Hash for RecordExprField {
5962    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5963}
5964impl Eq for RecordExprField {}
5965impl PartialEq for RecordExprField {
5966    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5967}
5968impl Clone for RecordExprField {
5969    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5970}
5971impl fmt::Debug for RecordExprField {
5972    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5973        f.debug_struct("RecordExprField").field("syntax", &self.syntax).finish()
5974    }
5975}
5976impl AstNode for RecordExprFieldList {
5977    #[inline]
5978    fn kind() -> SyntaxKind
5979    where
5980        Self: Sized,
5981    {
5982        RECORD_EXPR_FIELD_LIST
5983    }
5984    #[inline]
5985    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST }
5986    #[inline]
5987    fn cast(syntax: SyntaxNode) -> Option<Self> {
5988        if Self::can_cast(syntax.kind()) {
5989            Some(Self { syntax })
5990        } else {
5991            None
5992        }
5993    }
5994    #[inline]
5995    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5996}
5997impl hash::Hash for RecordExprFieldList {
5998    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5999}
6000impl Eq for RecordExprFieldList {}
6001impl PartialEq for RecordExprFieldList {
6002    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6003}
6004impl Clone for RecordExprFieldList {
6005    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6006}
6007impl fmt::Debug for RecordExprFieldList {
6008    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6009        f.debug_struct("RecordExprFieldList").field("syntax", &self.syntax).finish()
6010    }
6011}
6012impl AstNode for RecordField {
6013    #[inline]
6014    fn kind() -> SyntaxKind
6015    where
6016        Self: Sized,
6017    {
6018        RECORD_FIELD
6019    }
6020    #[inline]
6021    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD }
6022    #[inline]
6023    fn cast(syntax: SyntaxNode) -> Option<Self> {
6024        if Self::can_cast(syntax.kind()) {
6025            Some(Self { syntax })
6026        } else {
6027            None
6028        }
6029    }
6030    #[inline]
6031    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6032}
6033impl hash::Hash for RecordField {
6034    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6035}
6036impl Eq for RecordField {}
6037impl PartialEq for RecordField {
6038    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6039}
6040impl Clone for RecordField {
6041    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6042}
6043impl fmt::Debug for RecordField {
6044    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6045        f.debug_struct("RecordField").field("syntax", &self.syntax).finish()
6046    }
6047}
6048impl AstNode for RecordFieldList {
6049    #[inline]
6050    fn kind() -> SyntaxKind
6051    where
6052        Self: Sized,
6053    {
6054        RECORD_FIELD_LIST
6055    }
6056    #[inline]
6057    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST }
6058    #[inline]
6059    fn cast(syntax: SyntaxNode) -> Option<Self> {
6060        if Self::can_cast(syntax.kind()) {
6061            Some(Self { syntax })
6062        } else {
6063            None
6064        }
6065    }
6066    #[inline]
6067    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6068}
6069impl hash::Hash for RecordFieldList {
6070    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6071}
6072impl Eq for RecordFieldList {}
6073impl PartialEq for RecordFieldList {
6074    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6075}
6076impl Clone for RecordFieldList {
6077    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6078}
6079impl fmt::Debug for RecordFieldList {
6080    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6081        f.debug_struct("RecordFieldList").field("syntax", &self.syntax).finish()
6082    }
6083}
6084impl AstNode for RecordPat {
6085    #[inline]
6086    fn kind() -> SyntaxKind
6087    where
6088        Self: Sized,
6089    {
6090        RECORD_PAT
6091    }
6092    #[inline]
6093    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT }
6094    #[inline]
6095    fn cast(syntax: SyntaxNode) -> Option<Self> {
6096        if Self::can_cast(syntax.kind()) {
6097            Some(Self { syntax })
6098        } else {
6099            None
6100        }
6101    }
6102    #[inline]
6103    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6104}
6105impl hash::Hash for RecordPat {
6106    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6107}
6108impl Eq for RecordPat {}
6109impl PartialEq for RecordPat {
6110    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6111}
6112impl Clone for RecordPat {
6113    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6114}
6115impl fmt::Debug for RecordPat {
6116    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6117        f.debug_struct("RecordPat").field("syntax", &self.syntax).finish()
6118    }
6119}
6120impl AstNode for RecordPatField {
6121    #[inline]
6122    fn kind() -> SyntaxKind
6123    where
6124        Self: Sized,
6125    {
6126        RECORD_PAT_FIELD
6127    }
6128    #[inline]
6129    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT_FIELD }
6130    #[inline]
6131    fn cast(syntax: SyntaxNode) -> Option<Self> {
6132        if Self::can_cast(syntax.kind()) {
6133            Some(Self { syntax })
6134        } else {
6135            None
6136        }
6137    }
6138    #[inline]
6139    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6140}
6141impl hash::Hash for RecordPatField {
6142    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6143}
6144impl Eq for RecordPatField {}
6145impl PartialEq for RecordPatField {
6146    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6147}
6148impl Clone for RecordPatField {
6149    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6150}
6151impl fmt::Debug for RecordPatField {
6152    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6153        f.debug_struct("RecordPatField").field("syntax", &self.syntax).finish()
6154    }
6155}
6156impl AstNode for RecordPatFieldList {
6157    #[inline]
6158    fn kind() -> SyntaxKind
6159    where
6160        Self: Sized,
6161    {
6162        RECORD_PAT_FIELD_LIST
6163    }
6164    #[inline]
6165    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT_FIELD_LIST }
6166    #[inline]
6167    fn cast(syntax: SyntaxNode) -> Option<Self> {
6168        if Self::can_cast(syntax.kind()) {
6169            Some(Self { syntax })
6170        } else {
6171            None
6172        }
6173    }
6174    #[inline]
6175    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6176}
6177impl hash::Hash for RecordPatFieldList {
6178    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6179}
6180impl Eq for RecordPatFieldList {}
6181impl PartialEq for RecordPatFieldList {
6182    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6183}
6184impl Clone for RecordPatFieldList {
6185    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6186}
6187impl fmt::Debug for RecordPatFieldList {
6188    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6189        f.debug_struct("RecordPatFieldList").field("syntax", &self.syntax).finish()
6190    }
6191}
6192impl AstNode for RefExpr {
6193    #[inline]
6194    fn kind() -> SyntaxKind
6195    where
6196        Self: Sized,
6197    {
6198        REF_EXPR
6199    }
6200    #[inline]
6201    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR }
6202    #[inline]
6203    fn cast(syntax: SyntaxNode) -> Option<Self> {
6204        if Self::can_cast(syntax.kind()) {
6205            Some(Self { syntax })
6206        } else {
6207            None
6208        }
6209    }
6210    #[inline]
6211    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6212}
6213impl hash::Hash for RefExpr {
6214    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6215}
6216impl Eq for RefExpr {}
6217impl PartialEq for RefExpr {
6218    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6219}
6220impl Clone for RefExpr {
6221    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6222}
6223impl fmt::Debug for RefExpr {
6224    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6225        f.debug_struct("RefExpr").field("syntax", &self.syntax).finish()
6226    }
6227}
6228impl AstNode for RefPat {
6229    #[inline]
6230    fn kind() -> SyntaxKind
6231    where
6232        Self: Sized,
6233    {
6234        REF_PAT
6235    }
6236    #[inline]
6237    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_PAT }
6238    #[inline]
6239    fn cast(syntax: SyntaxNode) -> Option<Self> {
6240        if Self::can_cast(syntax.kind()) {
6241            Some(Self { syntax })
6242        } else {
6243            None
6244        }
6245    }
6246    #[inline]
6247    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6248}
6249impl hash::Hash for RefPat {
6250    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6251}
6252impl Eq for RefPat {}
6253impl PartialEq for RefPat {
6254    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6255}
6256impl Clone for RefPat {
6257    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6258}
6259impl fmt::Debug for RefPat {
6260    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6261        f.debug_struct("RefPat").field("syntax", &self.syntax).finish()
6262    }
6263}
6264impl AstNode for RefType {
6265    #[inline]
6266    fn kind() -> SyntaxKind
6267    where
6268        Self: Sized,
6269    {
6270        REF_TYPE
6271    }
6272    #[inline]
6273    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_TYPE }
6274    #[inline]
6275    fn cast(syntax: SyntaxNode) -> Option<Self> {
6276        if Self::can_cast(syntax.kind()) {
6277            Some(Self { syntax })
6278        } else {
6279            None
6280        }
6281    }
6282    #[inline]
6283    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6284}
6285impl hash::Hash for RefType {
6286    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6287}
6288impl Eq for RefType {}
6289impl PartialEq for RefType {
6290    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6291}
6292impl Clone for RefType {
6293    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6294}
6295impl fmt::Debug for RefType {
6296    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6297        f.debug_struct("RefType").field("syntax", &self.syntax).finish()
6298    }
6299}
6300impl AstNode for Rename {
6301    #[inline]
6302    fn kind() -> SyntaxKind
6303    where
6304        Self: Sized,
6305    {
6306        RENAME
6307    }
6308    #[inline]
6309    fn can_cast(kind: SyntaxKind) -> bool { kind == RENAME }
6310    #[inline]
6311    fn cast(syntax: SyntaxNode) -> Option<Self> {
6312        if Self::can_cast(syntax.kind()) {
6313            Some(Self { syntax })
6314        } else {
6315            None
6316        }
6317    }
6318    #[inline]
6319    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6320}
6321impl hash::Hash for Rename {
6322    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6323}
6324impl Eq for Rename {}
6325impl PartialEq for Rename {
6326    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6327}
6328impl Clone for Rename {
6329    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6330}
6331impl fmt::Debug for Rename {
6332    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6333        f.debug_struct("Rename").field("syntax", &self.syntax).finish()
6334    }
6335}
6336impl AstNode for RestPat {
6337    #[inline]
6338    fn kind() -> SyntaxKind
6339    where
6340        Self: Sized,
6341    {
6342        REST_PAT
6343    }
6344    #[inline]
6345    fn can_cast(kind: SyntaxKind) -> bool { kind == REST_PAT }
6346    #[inline]
6347    fn cast(syntax: SyntaxNode) -> Option<Self> {
6348        if Self::can_cast(syntax.kind()) {
6349            Some(Self { syntax })
6350        } else {
6351            None
6352        }
6353    }
6354    #[inline]
6355    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6356}
6357impl hash::Hash for RestPat {
6358    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6359}
6360impl Eq for RestPat {}
6361impl PartialEq for RestPat {
6362    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6363}
6364impl Clone for RestPat {
6365    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6366}
6367impl fmt::Debug for RestPat {
6368    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6369        f.debug_struct("RestPat").field("syntax", &self.syntax).finish()
6370    }
6371}
6372impl AstNode for RetType {
6373    #[inline]
6374    fn kind() -> SyntaxKind
6375    where
6376        Self: Sized,
6377    {
6378        RET_TYPE
6379    }
6380    #[inline]
6381    fn can_cast(kind: SyntaxKind) -> bool { kind == RET_TYPE }
6382    #[inline]
6383    fn cast(syntax: SyntaxNode) -> Option<Self> {
6384        if Self::can_cast(syntax.kind()) {
6385            Some(Self { syntax })
6386        } else {
6387            None
6388        }
6389    }
6390    #[inline]
6391    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6392}
6393impl hash::Hash for RetType {
6394    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6395}
6396impl Eq for RetType {}
6397impl PartialEq for RetType {
6398    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6399}
6400impl Clone for RetType {
6401    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6402}
6403impl fmt::Debug for RetType {
6404    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6405        f.debug_struct("RetType").field("syntax", &self.syntax).finish()
6406    }
6407}
6408impl AstNode for ReturnExpr {
6409    #[inline]
6410    fn kind() -> SyntaxKind
6411    where
6412        Self: Sized,
6413    {
6414        RETURN_EXPR
6415    }
6416    #[inline]
6417    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR }
6418    #[inline]
6419    fn cast(syntax: SyntaxNode) -> Option<Self> {
6420        if Self::can_cast(syntax.kind()) {
6421            Some(Self { syntax })
6422        } else {
6423            None
6424        }
6425    }
6426    #[inline]
6427    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6428}
6429impl hash::Hash for ReturnExpr {
6430    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6431}
6432impl Eq for ReturnExpr {}
6433impl PartialEq for ReturnExpr {
6434    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6435}
6436impl Clone for ReturnExpr {
6437    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6438}
6439impl fmt::Debug for ReturnExpr {
6440    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6441        f.debug_struct("ReturnExpr").field("syntax", &self.syntax).finish()
6442    }
6443}
6444impl AstNode for ReturnTypeSyntax {
6445    #[inline]
6446    fn kind() -> SyntaxKind
6447    where
6448        Self: Sized,
6449    {
6450        RETURN_TYPE_SYNTAX
6451    }
6452    #[inline]
6453    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_TYPE_SYNTAX }
6454    #[inline]
6455    fn cast(syntax: SyntaxNode) -> Option<Self> {
6456        if Self::can_cast(syntax.kind()) {
6457            Some(Self { syntax })
6458        } else {
6459            None
6460        }
6461    }
6462    #[inline]
6463    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6464}
6465impl hash::Hash for ReturnTypeSyntax {
6466    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6467}
6468impl Eq for ReturnTypeSyntax {}
6469impl PartialEq for ReturnTypeSyntax {
6470    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6471}
6472impl Clone for ReturnTypeSyntax {
6473    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6474}
6475impl fmt::Debug for ReturnTypeSyntax {
6476    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6477        f.debug_struct("ReturnTypeSyntax").field("syntax", &self.syntax).finish()
6478    }
6479}
6480impl AstNode for SelfParam {
6481    #[inline]
6482    fn kind() -> SyntaxKind
6483    where
6484        Self: Sized,
6485    {
6486        SELF_PARAM
6487    }
6488    #[inline]
6489    fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM }
6490    #[inline]
6491    fn cast(syntax: SyntaxNode) -> Option<Self> {
6492        if Self::can_cast(syntax.kind()) {
6493            Some(Self { syntax })
6494        } else {
6495            None
6496        }
6497    }
6498    #[inline]
6499    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6500}
6501impl hash::Hash for SelfParam {
6502    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6503}
6504impl Eq for SelfParam {}
6505impl PartialEq for SelfParam {
6506    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6507}
6508impl Clone for SelfParam {
6509    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6510}
6511impl fmt::Debug for SelfParam {
6512    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6513        f.debug_struct("SelfParam").field("syntax", &self.syntax).finish()
6514    }
6515}
6516impl AstNode for SlicePat {
6517    #[inline]
6518    fn kind() -> SyntaxKind
6519    where
6520        Self: Sized,
6521    {
6522        SLICE_PAT
6523    }
6524    #[inline]
6525    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_PAT }
6526    #[inline]
6527    fn cast(syntax: SyntaxNode) -> Option<Self> {
6528        if Self::can_cast(syntax.kind()) {
6529            Some(Self { syntax })
6530        } else {
6531            None
6532        }
6533    }
6534    #[inline]
6535    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6536}
6537impl hash::Hash for SlicePat {
6538    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6539}
6540impl Eq for SlicePat {}
6541impl PartialEq for SlicePat {
6542    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6543}
6544impl Clone for SlicePat {
6545    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6546}
6547impl fmt::Debug for SlicePat {
6548    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6549        f.debug_struct("SlicePat").field("syntax", &self.syntax).finish()
6550    }
6551}
6552impl AstNode for SliceType {
6553    #[inline]
6554    fn kind() -> SyntaxKind
6555    where
6556        Self: Sized,
6557    {
6558        SLICE_TYPE
6559    }
6560    #[inline]
6561    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE }
6562    #[inline]
6563    fn cast(syntax: SyntaxNode) -> Option<Self> {
6564        if Self::can_cast(syntax.kind()) {
6565            Some(Self { syntax })
6566        } else {
6567            None
6568        }
6569    }
6570    #[inline]
6571    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6572}
6573impl hash::Hash for SliceType {
6574    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6575}
6576impl Eq for SliceType {}
6577impl PartialEq for SliceType {
6578    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6579}
6580impl Clone for SliceType {
6581    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6582}
6583impl fmt::Debug for SliceType {
6584    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6585        f.debug_struct("SliceType").field("syntax", &self.syntax).finish()
6586    }
6587}
6588impl AstNode for SourceFile {
6589    #[inline]
6590    fn kind() -> SyntaxKind
6591    where
6592        Self: Sized,
6593    {
6594        SOURCE_FILE
6595    }
6596    #[inline]
6597    fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE }
6598    #[inline]
6599    fn cast(syntax: SyntaxNode) -> Option<Self> {
6600        if Self::can_cast(syntax.kind()) {
6601            Some(Self { syntax })
6602        } else {
6603            None
6604        }
6605    }
6606    #[inline]
6607    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6608}
6609impl hash::Hash for SourceFile {
6610    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6611}
6612impl Eq for SourceFile {}
6613impl PartialEq for SourceFile {
6614    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6615}
6616impl Clone for SourceFile {
6617    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6618}
6619impl fmt::Debug for SourceFile {
6620    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6621        f.debug_struct("SourceFile").field("syntax", &self.syntax).finish()
6622    }
6623}
6624impl AstNode for Static {
6625    #[inline]
6626    fn kind() -> SyntaxKind
6627    where
6628        Self: Sized,
6629    {
6630        STATIC
6631    }
6632    #[inline]
6633    fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC }
6634    #[inline]
6635    fn cast(syntax: SyntaxNode) -> Option<Self> {
6636        if Self::can_cast(syntax.kind()) {
6637            Some(Self { syntax })
6638        } else {
6639            None
6640        }
6641    }
6642    #[inline]
6643    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6644}
6645impl hash::Hash for Static {
6646    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6647}
6648impl Eq for Static {}
6649impl PartialEq for Static {
6650    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6651}
6652impl Clone for Static {
6653    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6654}
6655impl fmt::Debug for Static {
6656    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6657        f.debug_struct("Static").field("syntax", &self.syntax).finish()
6658    }
6659}
6660impl AstNode for StmtList {
6661    #[inline]
6662    fn kind() -> SyntaxKind
6663    where
6664        Self: Sized,
6665    {
6666        STMT_LIST
6667    }
6668    #[inline]
6669    fn can_cast(kind: SyntaxKind) -> bool { kind == STMT_LIST }
6670    #[inline]
6671    fn cast(syntax: SyntaxNode) -> Option<Self> {
6672        if Self::can_cast(syntax.kind()) {
6673            Some(Self { syntax })
6674        } else {
6675            None
6676        }
6677    }
6678    #[inline]
6679    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6680}
6681impl hash::Hash for StmtList {
6682    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6683}
6684impl Eq for StmtList {}
6685impl PartialEq for StmtList {
6686    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6687}
6688impl Clone for StmtList {
6689    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6690}
6691impl fmt::Debug for StmtList {
6692    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6693        f.debug_struct("StmtList").field("syntax", &self.syntax).finish()
6694    }
6695}
6696impl AstNode for Struct {
6697    #[inline]
6698    fn kind() -> SyntaxKind
6699    where
6700        Self: Sized,
6701    {
6702        STRUCT
6703    }
6704    #[inline]
6705    fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT }
6706    #[inline]
6707    fn cast(syntax: SyntaxNode) -> Option<Self> {
6708        if Self::can_cast(syntax.kind()) {
6709            Some(Self { syntax })
6710        } else {
6711            None
6712        }
6713    }
6714    #[inline]
6715    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6716}
6717impl hash::Hash for Struct {
6718    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6719}
6720impl Eq for Struct {}
6721impl PartialEq for Struct {
6722    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6723}
6724impl Clone for Struct {
6725    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6726}
6727impl fmt::Debug for Struct {
6728    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6729        f.debug_struct("Struct").field("syntax", &self.syntax).finish()
6730    }
6731}
6732impl AstNode for TokenTree {
6733    #[inline]
6734    fn kind() -> SyntaxKind
6735    where
6736        Self: Sized,
6737    {
6738        TOKEN_TREE
6739    }
6740    #[inline]
6741    fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE }
6742    #[inline]
6743    fn cast(syntax: SyntaxNode) -> Option<Self> {
6744        if Self::can_cast(syntax.kind()) {
6745            Some(Self { syntax })
6746        } else {
6747            None
6748        }
6749    }
6750    #[inline]
6751    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6752}
6753impl hash::Hash for TokenTree {
6754    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6755}
6756impl Eq for TokenTree {}
6757impl PartialEq for TokenTree {
6758    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6759}
6760impl Clone for TokenTree {
6761    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6762}
6763impl fmt::Debug for TokenTree {
6764    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6765        f.debug_struct("TokenTree").field("syntax", &self.syntax).finish()
6766    }
6767}
6768impl AstNode for Trait {
6769    #[inline]
6770    fn kind() -> SyntaxKind
6771    where
6772        Self: Sized,
6773    {
6774        TRAIT
6775    }
6776    #[inline]
6777    fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT }
6778    #[inline]
6779    fn cast(syntax: SyntaxNode) -> Option<Self> {
6780        if Self::can_cast(syntax.kind()) {
6781            Some(Self { syntax })
6782        } else {
6783            None
6784        }
6785    }
6786    #[inline]
6787    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6788}
6789impl hash::Hash for Trait {
6790    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6791}
6792impl Eq for Trait {}
6793impl PartialEq for Trait {
6794    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6795}
6796impl Clone for Trait {
6797    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6798}
6799impl fmt::Debug for Trait {
6800    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6801        f.debug_struct("Trait").field("syntax", &self.syntax).finish()
6802    }
6803}
6804impl AstNode for TraitAlias {
6805    #[inline]
6806    fn kind() -> SyntaxKind
6807    where
6808        Self: Sized,
6809    {
6810        TRAIT_ALIAS
6811    }
6812    #[inline]
6813    fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT_ALIAS }
6814    #[inline]
6815    fn cast(syntax: SyntaxNode) -> Option<Self> {
6816        if Self::can_cast(syntax.kind()) {
6817            Some(Self { syntax })
6818        } else {
6819            None
6820        }
6821    }
6822    #[inline]
6823    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6824}
6825impl hash::Hash for TraitAlias {
6826    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6827}
6828impl Eq for TraitAlias {}
6829impl PartialEq for TraitAlias {
6830    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6831}
6832impl Clone for TraitAlias {
6833    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6834}
6835impl fmt::Debug for TraitAlias {
6836    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6837        f.debug_struct("TraitAlias").field("syntax", &self.syntax).finish()
6838    }
6839}
6840impl AstNode for TryExpr {
6841    #[inline]
6842    fn kind() -> SyntaxKind
6843    where
6844        Self: Sized,
6845    {
6846        TRY_EXPR
6847    }
6848    #[inline]
6849    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR }
6850    #[inline]
6851    fn cast(syntax: SyntaxNode) -> Option<Self> {
6852        if Self::can_cast(syntax.kind()) {
6853            Some(Self { syntax })
6854        } else {
6855            None
6856        }
6857    }
6858    #[inline]
6859    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6860}
6861impl hash::Hash for TryExpr {
6862    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6863}
6864impl Eq for TryExpr {}
6865impl PartialEq for TryExpr {
6866    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6867}
6868impl Clone for TryExpr {
6869    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6870}
6871impl fmt::Debug for TryExpr {
6872    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6873        f.debug_struct("TryExpr").field("syntax", &self.syntax).finish()
6874    }
6875}
6876impl AstNode for TupleExpr {
6877    #[inline]
6878    fn kind() -> SyntaxKind
6879    where
6880        Self: Sized,
6881    {
6882        TUPLE_EXPR
6883    }
6884    #[inline]
6885    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR }
6886    #[inline]
6887    fn cast(syntax: SyntaxNode) -> Option<Self> {
6888        if Self::can_cast(syntax.kind()) {
6889            Some(Self { syntax })
6890        } else {
6891            None
6892        }
6893    }
6894    #[inline]
6895    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6896}
6897impl hash::Hash for TupleExpr {
6898    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6899}
6900impl Eq for TupleExpr {}
6901impl PartialEq for TupleExpr {
6902    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6903}
6904impl Clone for TupleExpr {
6905    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6906}
6907impl fmt::Debug for TupleExpr {
6908    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6909        f.debug_struct("TupleExpr").field("syntax", &self.syntax).finish()
6910    }
6911}
6912impl AstNode for TupleField {
6913    #[inline]
6914    fn kind() -> SyntaxKind
6915    where
6916        Self: Sized,
6917    {
6918        TUPLE_FIELD
6919    }
6920    #[inline]
6921    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD }
6922    #[inline]
6923    fn cast(syntax: SyntaxNode) -> Option<Self> {
6924        if Self::can_cast(syntax.kind()) {
6925            Some(Self { syntax })
6926        } else {
6927            None
6928        }
6929    }
6930    #[inline]
6931    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6932}
6933impl hash::Hash for TupleField {
6934    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6935}
6936impl Eq for TupleField {}
6937impl PartialEq for TupleField {
6938    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6939}
6940impl Clone for TupleField {
6941    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6942}
6943impl fmt::Debug for TupleField {
6944    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6945        f.debug_struct("TupleField").field("syntax", &self.syntax).finish()
6946    }
6947}
6948impl AstNode for TupleFieldList {
6949    #[inline]
6950    fn kind() -> SyntaxKind
6951    where
6952        Self: Sized,
6953    {
6954        TUPLE_FIELD_LIST
6955    }
6956    #[inline]
6957    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_LIST }
6958    #[inline]
6959    fn cast(syntax: SyntaxNode) -> Option<Self> {
6960        if Self::can_cast(syntax.kind()) {
6961            Some(Self { syntax })
6962        } else {
6963            None
6964        }
6965    }
6966    #[inline]
6967    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6968}
6969impl hash::Hash for TupleFieldList {
6970    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6971}
6972impl Eq for TupleFieldList {}
6973impl PartialEq for TupleFieldList {
6974    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6975}
6976impl Clone for TupleFieldList {
6977    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6978}
6979impl fmt::Debug for TupleFieldList {
6980    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6981        f.debug_struct("TupleFieldList").field("syntax", &self.syntax).finish()
6982    }
6983}
6984impl AstNode for TuplePat {
6985    #[inline]
6986    fn kind() -> SyntaxKind
6987    where
6988        Self: Sized,
6989    {
6990        TUPLE_PAT
6991    }
6992    #[inline]
6993    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_PAT }
6994    #[inline]
6995    fn cast(syntax: SyntaxNode) -> Option<Self> {
6996        if Self::can_cast(syntax.kind()) {
6997            Some(Self { syntax })
6998        } else {
6999            None
7000        }
7001    }
7002    #[inline]
7003    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7004}
7005impl hash::Hash for TuplePat {
7006    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7007}
7008impl Eq for TuplePat {}
7009impl PartialEq for TuplePat {
7010    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7011}
7012impl Clone for TuplePat {
7013    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7014}
7015impl fmt::Debug for TuplePat {
7016    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7017        f.debug_struct("TuplePat").field("syntax", &self.syntax).finish()
7018    }
7019}
7020impl AstNode for TupleStructPat {
7021    #[inline]
7022    fn kind() -> SyntaxKind
7023    where
7024        Self: Sized,
7025    {
7026        TUPLE_STRUCT_PAT
7027    }
7028    #[inline]
7029    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_STRUCT_PAT }
7030    #[inline]
7031    fn cast(syntax: SyntaxNode) -> Option<Self> {
7032        if Self::can_cast(syntax.kind()) {
7033            Some(Self { syntax })
7034        } else {
7035            None
7036        }
7037    }
7038    #[inline]
7039    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7040}
7041impl hash::Hash for TupleStructPat {
7042    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7043}
7044impl Eq for TupleStructPat {}
7045impl PartialEq for TupleStructPat {
7046    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7047}
7048impl Clone for TupleStructPat {
7049    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7050}
7051impl fmt::Debug for TupleStructPat {
7052    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7053        f.debug_struct("TupleStructPat").field("syntax", &self.syntax).finish()
7054    }
7055}
7056impl AstNode for TupleType {
7057    #[inline]
7058    fn kind() -> SyntaxKind
7059    where
7060        Self: Sized,
7061    {
7062        TUPLE_TYPE
7063    }
7064    #[inline]
7065    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE }
7066    #[inline]
7067    fn cast(syntax: SyntaxNode) -> Option<Self> {
7068        if Self::can_cast(syntax.kind()) {
7069            Some(Self { syntax })
7070        } else {
7071            None
7072        }
7073    }
7074    #[inline]
7075    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7076}
7077impl hash::Hash for TupleType {
7078    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7079}
7080impl Eq for TupleType {}
7081impl PartialEq for TupleType {
7082    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7083}
7084impl Clone for TupleType {
7085    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7086}
7087impl fmt::Debug for TupleType {
7088    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7089        f.debug_struct("TupleType").field("syntax", &self.syntax).finish()
7090    }
7091}
7092impl AstNode for TypeAlias {
7093    #[inline]
7094    fn kind() -> SyntaxKind
7095    where
7096        Self: Sized,
7097    {
7098        TYPE_ALIAS
7099    }
7100    #[inline]
7101    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS }
7102    #[inline]
7103    fn cast(syntax: SyntaxNode) -> Option<Self> {
7104        if Self::can_cast(syntax.kind()) {
7105            Some(Self { syntax })
7106        } else {
7107            None
7108        }
7109    }
7110    #[inline]
7111    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7112}
7113impl hash::Hash for TypeAlias {
7114    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7115}
7116impl Eq for TypeAlias {}
7117impl PartialEq for TypeAlias {
7118    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7119}
7120impl Clone for TypeAlias {
7121    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7122}
7123impl fmt::Debug for TypeAlias {
7124    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7125        f.debug_struct("TypeAlias").field("syntax", &self.syntax).finish()
7126    }
7127}
7128impl AstNode for TypeAnchor {
7129    #[inline]
7130    fn kind() -> SyntaxKind
7131    where
7132        Self: Sized,
7133    {
7134        TYPE_ANCHOR
7135    }
7136    #[inline]
7137    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ANCHOR }
7138    #[inline]
7139    fn cast(syntax: SyntaxNode) -> Option<Self> {
7140        if Self::can_cast(syntax.kind()) {
7141            Some(Self { syntax })
7142        } else {
7143            None
7144        }
7145    }
7146    #[inline]
7147    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7148}
7149impl hash::Hash for TypeAnchor {
7150    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7151}
7152impl Eq for TypeAnchor {}
7153impl PartialEq for TypeAnchor {
7154    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7155}
7156impl Clone for TypeAnchor {
7157    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7158}
7159impl fmt::Debug for TypeAnchor {
7160    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7161        f.debug_struct("TypeAnchor").field("syntax", &self.syntax).finish()
7162    }
7163}
7164impl AstNode for TypeArg {
7165    #[inline]
7166    fn kind() -> SyntaxKind
7167    where
7168        Self: Sized,
7169    {
7170        TYPE_ARG
7171    }
7172    #[inline]
7173    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG }
7174    #[inline]
7175    fn cast(syntax: SyntaxNode) -> Option<Self> {
7176        if Self::can_cast(syntax.kind()) {
7177            Some(Self { syntax })
7178        } else {
7179            None
7180        }
7181    }
7182    #[inline]
7183    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7184}
7185impl hash::Hash for TypeArg {
7186    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7187}
7188impl Eq for TypeArg {}
7189impl PartialEq for TypeArg {
7190    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7191}
7192impl Clone for TypeArg {
7193    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7194}
7195impl fmt::Debug for TypeArg {
7196    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7197        f.debug_struct("TypeArg").field("syntax", &self.syntax).finish()
7198    }
7199}
7200impl AstNode for TypeBound {
7201    #[inline]
7202    fn kind() -> SyntaxKind
7203    where
7204        Self: Sized,
7205    {
7206        TYPE_BOUND
7207    }
7208    #[inline]
7209    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND }
7210    #[inline]
7211    fn cast(syntax: SyntaxNode) -> Option<Self> {
7212        if Self::can_cast(syntax.kind()) {
7213            Some(Self { syntax })
7214        } else {
7215            None
7216        }
7217    }
7218    #[inline]
7219    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7220}
7221impl hash::Hash for TypeBound {
7222    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7223}
7224impl Eq for TypeBound {}
7225impl PartialEq for TypeBound {
7226    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7227}
7228impl Clone for TypeBound {
7229    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7230}
7231impl fmt::Debug for TypeBound {
7232    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7233        f.debug_struct("TypeBound").field("syntax", &self.syntax).finish()
7234    }
7235}
7236impl AstNode for TypeBoundList {
7237    #[inline]
7238    fn kind() -> SyntaxKind
7239    where
7240        Self: Sized,
7241    {
7242        TYPE_BOUND_LIST
7243    }
7244    #[inline]
7245    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
7246    #[inline]
7247    fn cast(syntax: SyntaxNode) -> Option<Self> {
7248        if Self::can_cast(syntax.kind()) {
7249            Some(Self { syntax })
7250        } else {
7251            None
7252        }
7253    }
7254    #[inline]
7255    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7256}
7257impl hash::Hash for TypeBoundList {
7258    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7259}
7260impl Eq for TypeBoundList {}
7261impl PartialEq for TypeBoundList {
7262    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7263}
7264impl Clone for TypeBoundList {
7265    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7266}
7267impl fmt::Debug for TypeBoundList {
7268    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7269        f.debug_struct("TypeBoundList").field("syntax", &self.syntax).finish()
7270    }
7271}
7272impl AstNode for TypeParam {
7273    #[inline]
7274    fn kind() -> SyntaxKind
7275    where
7276        Self: Sized,
7277    {
7278        TYPE_PARAM
7279    }
7280    #[inline]
7281    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM }
7282    #[inline]
7283    fn cast(syntax: SyntaxNode) -> Option<Self> {
7284        if Self::can_cast(syntax.kind()) {
7285            Some(Self { syntax })
7286        } else {
7287            None
7288        }
7289    }
7290    #[inline]
7291    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7292}
7293impl hash::Hash for TypeParam {
7294    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7295}
7296impl Eq for TypeParam {}
7297impl PartialEq for TypeParam {
7298    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7299}
7300impl Clone for TypeParam {
7301    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7302}
7303impl fmt::Debug for TypeParam {
7304    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7305        f.debug_struct("TypeParam").field("syntax", &self.syntax).finish()
7306    }
7307}
7308impl AstNode for UnderscoreExpr {
7309    #[inline]
7310    fn kind() -> SyntaxKind
7311    where
7312        Self: Sized,
7313    {
7314        UNDERSCORE_EXPR
7315    }
7316    #[inline]
7317    fn can_cast(kind: SyntaxKind) -> bool { kind == UNDERSCORE_EXPR }
7318    #[inline]
7319    fn cast(syntax: SyntaxNode) -> Option<Self> {
7320        if Self::can_cast(syntax.kind()) {
7321            Some(Self { syntax })
7322        } else {
7323            None
7324        }
7325    }
7326    #[inline]
7327    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7328}
7329impl hash::Hash for UnderscoreExpr {
7330    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7331}
7332impl Eq for UnderscoreExpr {}
7333impl PartialEq for UnderscoreExpr {
7334    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7335}
7336impl Clone for UnderscoreExpr {
7337    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7338}
7339impl fmt::Debug for UnderscoreExpr {
7340    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7341        f.debug_struct("UnderscoreExpr").field("syntax", &self.syntax).finish()
7342    }
7343}
7344impl AstNode for Union {
7345    #[inline]
7346    fn kind() -> SyntaxKind
7347    where
7348        Self: Sized,
7349    {
7350        UNION
7351    }
7352    #[inline]
7353    fn can_cast(kind: SyntaxKind) -> bool { kind == UNION }
7354    #[inline]
7355    fn cast(syntax: SyntaxNode) -> Option<Self> {
7356        if Self::can_cast(syntax.kind()) {
7357            Some(Self { syntax })
7358        } else {
7359            None
7360        }
7361    }
7362    #[inline]
7363    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7364}
7365impl hash::Hash for Union {
7366    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7367}
7368impl Eq for Union {}
7369impl PartialEq for Union {
7370    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7371}
7372impl Clone for Union {
7373    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7374}
7375impl fmt::Debug for Union {
7376    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7377        f.debug_struct("Union").field("syntax", &self.syntax).finish()
7378    }
7379}
7380impl AstNode for Use {
7381    #[inline]
7382    fn kind() -> SyntaxKind
7383    where
7384        Self: Sized,
7385    {
7386        USE
7387    }
7388    #[inline]
7389    fn can_cast(kind: SyntaxKind) -> bool { kind == USE }
7390    #[inline]
7391    fn cast(syntax: SyntaxNode) -> Option<Self> {
7392        if Self::can_cast(syntax.kind()) {
7393            Some(Self { syntax })
7394        } else {
7395            None
7396        }
7397    }
7398    #[inline]
7399    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7400}
7401impl hash::Hash for Use {
7402    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7403}
7404impl Eq for Use {}
7405impl PartialEq for Use {
7406    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7407}
7408impl Clone for Use {
7409    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7410}
7411impl fmt::Debug for Use {
7412    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7413        f.debug_struct("Use").field("syntax", &self.syntax).finish()
7414    }
7415}
7416impl AstNode for UseBoundGenericArgs {
7417    #[inline]
7418    fn kind() -> SyntaxKind
7419    where
7420        Self: Sized,
7421    {
7422        USE_BOUND_GENERIC_ARGS
7423    }
7424    #[inline]
7425    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_BOUND_GENERIC_ARGS }
7426    #[inline]
7427    fn cast(syntax: SyntaxNode) -> Option<Self> {
7428        if Self::can_cast(syntax.kind()) {
7429            Some(Self { syntax })
7430        } else {
7431            None
7432        }
7433    }
7434    #[inline]
7435    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7436}
7437impl hash::Hash for UseBoundGenericArgs {
7438    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7439}
7440impl Eq for UseBoundGenericArgs {}
7441impl PartialEq for UseBoundGenericArgs {
7442    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7443}
7444impl Clone for UseBoundGenericArgs {
7445    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7446}
7447impl fmt::Debug for UseBoundGenericArgs {
7448    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7449        f.debug_struct("UseBoundGenericArgs").field("syntax", &self.syntax).finish()
7450    }
7451}
7452impl AstNode for UseTree {
7453    #[inline]
7454    fn kind() -> SyntaxKind
7455    where
7456        Self: Sized,
7457    {
7458        USE_TREE
7459    }
7460    #[inline]
7461    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE }
7462    #[inline]
7463    fn cast(syntax: SyntaxNode) -> Option<Self> {
7464        if Self::can_cast(syntax.kind()) {
7465            Some(Self { syntax })
7466        } else {
7467            None
7468        }
7469    }
7470    #[inline]
7471    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7472}
7473impl hash::Hash for UseTree {
7474    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7475}
7476impl Eq for UseTree {}
7477impl PartialEq for UseTree {
7478    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7479}
7480impl Clone for UseTree {
7481    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7482}
7483impl fmt::Debug for UseTree {
7484    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7485        f.debug_struct("UseTree").field("syntax", &self.syntax).finish()
7486    }
7487}
7488impl AstNode for UseTreeList {
7489    #[inline]
7490    fn kind() -> SyntaxKind
7491    where
7492        Self: Sized,
7493    {
7494        USE_TREE_LIST
7495    }
7496    #[inline]
7497    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE_LIST }
7498    #[inline]
7499    fn cast(syntax: SyntaxNode) -> Option<Self> {
7500        if Self::can_cast(syntax.kind()) {
7501            Some(Self { syntax })
7502        } else {
7503            None
7504        }
7505    }
7506    #[inline]
7507    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7508}
7509impl hash::Hash for UseTreeList {
7510    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7511}
7512impl Eq for UseTreeList {}
7513impl PartialEq for UseTreeList {
7514    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7515}
7516impl Clone for UseTreeList {
7517    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7518}
7519impl fmt::Debug for UseTreeList {
7520    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7521        f.debug_struct("UseTreeList").field("syntax", &self.syntax).finish()
7522    }
7523}
7524impl AstNode for Variant {
7525    #[inline]
7526    fn kind() -> SyntaxKind
7527    where
7528        Self: Sized,
7529    {
7530        VARIANT
7531    }
7532    #[inline]
7533    fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT }
7534    #[inline]
7535    fn cast(syntax: SyntaxNode) -> Option<Self> {
7536        if Self::can_cast(syntax.kind()) {
7537            Some(Self { syntax })
7538        } else {
7539            None
7540        }
7541    }
7542    #[inline]
7543    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7544}
7545impl hash::Hash for Variant {
7546    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7547}
7548impl Eq for Variant {}
7549impl PartialEq for Variant {
7550    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7551}
7552impl Clone for Variant {
7553    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7554}
7555impl fmt::Debug for Variant {
7556    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7557        f.debug_struct("Variant").field("syntax", &self.syntax).finish()
7558    }
7559}
7560impl AstNode for VariantList {
7561    #[inline]
7562    fn kind() -> SyntaxKind
7563    where
7564        Self: Sized,
7565    {
7566        VARIANT_LIST
7567    }
7568    #[inline]
7569    fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT_LIST }
7570    #[inline]
7571    fn cast(syntax: SyntaxNode) -> Option<Self> {
7572        if Self::can_cast(syntax.kind()) {
7573            Some(Self { syntax })
7574        } else {
7575            None
7576        }
7577    }
7578    #[inline]
7579    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7580}
7581impl hash::Hash for VariantList {
7582    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7583}
7584impl Eq for VariantList {}
7585impl PartialEq for VariantList {
7586    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7587}
7588impl Clone for VariantList {
7589    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7590}
7591impl fmt::Debug for VariantList {
7592    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7593        f.debug_struct("VariantList").field("syntax", &self.syntax).finish()
7594    }
7595}
7596impl AstNode for Visibility {
7597    #[inline]
7598    fn kind() -> SyntaxKind
7599    where
7600        Self: Sized,
7601    {
7602        VISIBILITY
7603    }
7604    #[inline]
7605    fn can_cast(kind: SyntaxKind) -> bool { kind == VISIBILITY }
7606    #[inline]
7607    fn cast(syntax: SyntaxNode) -> Option<Self> {
7608        if Self::can_cast(syntax.kind()) {
7609            Some(Self { syntax })
7610        } else {
7611            None
7612        }
7613    }
7614    #[inline]
7615    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7616}
7617impl hash::Hash for Visibility {
7618    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7619}
7620impl Eq for Visibility {}
7621impl PartialEq for Visibility {
7622    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7623}
7624impl Clone for Visibility {
7625    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7626}
7627impl fmt::Debug for Visibility {
7628    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7629        f.debug_struct("Visibility").field("syntax", &self.syntax).finish()
7630    }
7631}
7632impl AstNode for WhereClause {
7633    #[inline]
7634    fn kind() -> SyntaxKind
7635    where
7636        Self: Sized,
7637    {
7638        WHERE_CLAUSE
7639    }
7640    #[inline]
7641    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_CLAUSE }
7642    #[inline]
7643    fn cast(syntax: SyntaxNode) -> Option<Self> {
7644        if Self::can_cast(syntax.kind()) {
7645            Some(Self { syntax })
7646        } else {
7647            None
7648        }
7649    }
7650    #[inline]
7651    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7652}
7653impl hash::Hash for WhereClause {
7654    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7655}
7656impl Eq for WhereClause {}
7657impl PartialEq for WhereClause {
7658    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7659}
7660impl Clone for WhereClause {
7661    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7662}
7663impl fmt::Debug for WhereClause {
7664    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7665        f.debug_struct("WhereClause").field("syntax", &self.syntax).finish()
7666    }
7667}
7668impl AstNode for WherePred {
7669    #[inline]
7670    fn kind() -> SyntaxKind
7671    where
7672        Self: Sized,
7673    {
7674        WHERE_PRED
7675    }
7676    #[inline]
7677    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED }
7678    #[inline]
7679    fn cast(syntax: SyntaxNode) -> Option<Self> {
7680        if Self::can_cast(syntax.kind()) {
7681            Some(Self { syntax })
7682        } else {
7683            None
7684        }
7685    }
7686    #[inline]
7687    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7688}
7689impl hash::Hash for WherePred {
7690    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7691}
7692impl Eq for WherePred {}
7693impl PartialEq for WherePred {
7694    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7695}
7696impl Clone for WherePred {
7697    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7698}
7699impl fmt::Debug for WherePred {
7700    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7701        f.debug_struct("WherePred").field("syntax", &self.syntax).finish()
7702    }
7703}
7704impl AstNode for WhileExpr {
7705    #[inline]
7706    fn kind() -> SyntaxKind
7707    where
7708        Self: Sized,
7709    {
7710        WHILE_EXPR
7711    }
7712    #[inline]
7713    fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR }
7714    #[inline]
7715    fn cast(syntax: SyntaxNode) -> Option<Self> {
7716        if Self::can_cast(syntax.kind()) {
7717            Some(Self { syntax })
7718        } else {
7719            None
7720        }
7721    }
7722    #[inline]
7723    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7724}
7725impl hash::Hash for WhileExpr {
7726    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7727}
7728impl Eq for WhileExpr {}
7729impl PartialEq for WhileExpr {
7730    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7731}
7732impl Clone for WhileExpr {
7733    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7734}
7735impl fmt::Debug for WhileExpr {
7736    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7737        f.debug_struct("WhileExpr").field("syntax", &self.syntax).finish()
7738    }
7739}
7740impl AstNode for WildcardPat {
7741    #[inline]
7742    fn kind() -> SyntaxKind
7743    where
7744        Self: Sized,
7745    {
7746        WILDCARD_PAT
7747    }
7748    #[inline]
7749    fn can_cast(kind: SyntaxKind) -> bool { kind == WILDCARD_PAT }
7750    #[inline]
7751    fn cast(syntax: SyntaxNode) -> Option<Self> {
7752        if Self::can_cast(syntax.kind()) {
7753            Some(Self { syntax })
7754        } else {
7755            None
7756        }
7757    }
7758    #[inline]
7759    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7760}
7761impl hash::Hash for WildcardPat {
7762    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7763}
7764impl Eq for WildcardPat {}
7765impl PartialEq for WildcardPat {
7766    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7767}
7768impl Clone for WildcardPat {
7769    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7770}
7771impl fmt::Debug for WildcardPat {
7772    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7773        f.debug_struct("WildcardPat").field("syntax", &self.syntax).finish()
7774    }
7775}
7776impl AstNode for YeetExpr {
7777    #[inline]
7778    fn kind() -> SyntaxKind
7779    where
7780        Self: Sized,
7781    {
7782        YEET_EXPR
7783    }
7784    #[inline]
7785    fn can_cast(kind: SyntaxKind) -> bool { kind == YEET_EXPR }
7786    #[inline]
7787    fn cast(syntax: SyntaxNode) -> Option<Self> {
7788        if Self::can_cast(syntax.kind()) {
7789            Some(Self { syntax })
7790        } else {
7791            None
7792        }
7793    }
7794    #[inline]
7795    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7796}
7797impl hash::Hash for YeetExpr {
7798    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7799}
7800impl Eq for YeetExpr {}
7801impl PartialEq for YeetExpr {
7802    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7803}
7804impl Clone for YeetExpr {
7805    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7806}
7807impl fmt::Debug for YeetExpr {
7808    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7809        f.debug_struct("YeetExpr").field("syntax", &self.syntax).finish()
7810    }
7811}
7812impl AstNode for YieldExpr {
7813    #[inline]
7814    fn kind() -> SyntaxKind
7815    where
7816        Self: Sized,
7817    {
7818        YIELD_EXPR
7819    }
7820    #[inline]
7821    fn can_cast(kind: SyntaxKind) -> bool { kind == YIELD_EXPR }
7822    #[inline]
7823    fn cast(syntax: SyntaxNode) -> Option<Self> {
7824        if Self::can_cast(syntax.kind()) {
7825            Some(Self { syntax })
7826        } else {
7827            None
7828        }
7829    }
7830    #[inline]
7831    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7832}
7833impl hash::Hash for YieldExpr {
7834    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7835}
7836impl Eq for YieldExpr {}
7837impl PartialEq for YieldExpr {
7838    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7839}
7840impl Clone for YieldExpr {
7841    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7842}
7843impl fmt::Debug for YieldExpr {
7844    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7845        f.debug_struct("YieldExpr").field("syntax", &self.syntax).finish()
7846    }
7847}
7848impl From<Enum> for Adt {
7849    #[inline]
7850    fn from(node: Enum) -> Adt { Adt::Enum(node) }
7851}
7852impl From<Struct> for Adt {
7853    #[inline]
7854    fn from(node: Struct) -> Adt { Adt::Struct(node) }
7855}
7856impl From<Union> for Adt {
7857    #[inline]
7858    fn from(node: Union) -> Adt { Adt::Union(node) }
7859}
7860impl AstNode for Adt {
7861    #[inline]
7862    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ENUM | STRUCT | UNION) }
7863    #[inline]
7864    fn cast(syntax: SyntaxNode) -> Option<Self> {
7865        let res = match syntax.kind() {
7866            ENUM => Adt::Enum(Enum { syntax }),
7867            STRUCT => Adt::Struct(Struct { syntax }),
7868            UNION => Adt::Union(Union { syntax }),
7869            _ => return None,
7870        };
7871        Some(res)
7872    }
7873    #[inline]
7874    fn syntax(&self) -> &SyntaxNode {
7875        match self {
7876            Adt::Enum(it) => &it.syntax,
7877            Adt::Struct(it) => &it.syntax,
7878            Adt::Union(it) => &it.syntax,
7879        }
7880    }
7881}
7882impl From<AsmConst> for AsmOperand {
7883    #[inline]
7884    fn from(node: AsmConst) -> AsmOperand { AsmOperand::AsmConst(node) }
7885}
7886impl From<AsmLabel> for AsmOperand {
7887    #[inline]
7888    fn from(node: AsmLabel) -> AsmOperand { AsmOperand::AsmLabel(node) }
7889}
7890impl From<AsmRegOperand> for AsmOperand {
7891    #[inline]
7892    fn from(node: AsmRegOperand) -> AsmOperand { AsmOperand::AsmRegOperand(node) }
7893}
7894impl From<AsmSym> for AsmOperand {
7895    #[inline]
7896    fn from(node: AsmSym) -> AsmOperand { AsmOperand::AsmSym(node) }
7897}
7898impl AstNode for AsmOperand {
7899    #[inline]
7900    fn can_cast(kind: SyntaxKind) -> bool {
7901        matches!(kind, ASM_CONST | ASM_LABEL | ASM_REG_OPERAND | ASM_SYM)
7902    }
7903    #[inline]
7904    fn cast(syntax: SyntaxNode) -> Option<Self> {
7905        let res = match syntax.kind() {
7906            ASM_CONST => AsmOperand::AsmConst(AsmConst { syntax }),
7907            ASM_LABEL => AsmOperand::AsmLabel(AsmLabel { syntax }),
7908            ASM_REG_OPERAND => AsmOperand::AsmRegOperand(AsmRegOperand { syntax }),
7909            ASM_SYM => AsmOperand::AsmSym(AsmSym { syntax }),
7910            _ => return None,
7911        };
7912        Some(res)
7913    }
7914    #[inline]
7915    fn syntax(&self) -> &SyntaxNode {
7916        match self {
7917            AsmOperand::AsmConst(it) => &it.syntax,
7918            AsmOperand::AsmLabel(it) => &it.syntax,
7919            AsmOperand::AsmRegOperand(it) => &it.syntax,
7920            AsmOperand::AsmSym(it) => &it.syntax,
7921        }
7922    }
7923}
7924impl From<AsmClobberAbi> for AsmPiece {
7925    #[inline]
7926    fn from(node: AsmClobberAbi) -> AsmPiece { AsmPiece::AsmClobberAbi(node) }
7927}
7928impl From<AsmOperandNamed> for AsmPiece {
7929    #[inline]
7930    fn from(node: AsmOperandNamed) -> AsmPiece { AsmPiece::AsmOperandNamed(node) }
7931}
7932impl From<AsmOptions> for AsmPiece {
7933    #[inline]
7934    fn from(node: AsmOptions) -> AsmPiece { AsmPiece::AsmOptions(node) }
7935}
7936impl AstNode for AsmPiece {
7937    #[inline]
7938    fn can_cast(kind: SyntaxKind) -> bool {
7939        matches!(kind, ASM_CLOBBER_ABI | ASM_OPERAND_NAMED | ASM_OPTIONS)
7940    }
7941    #[inline]
7942    fn cast(syntax: SyntaxNode) -> Option<Self> {
7943        let res = match syntax.kind() {
7944            ASM_CLOBBER_ABI => AsmPiece::AsmClobberAbi(AsmClobberAbi { syntax }),
7945            ASM_OPERAND_NAMED => AsmPiece::AsmOperandNamed(AsmOperandNamed { syntax }),
7946            ASM_OPTIONS => AsmPiece::AsmOptions(AsmOptions { syntax }),
7947            _ => return None,
7948        };
7949        Some(res)
7950    }
7951    #[inline]
7952    fn syntax(&self) -> &SyntaxNode {
7953        match self {
7954            AsmPiece::AsmClobberAbi(it) => &it.syntax,
7955            AsmPiece::AsmOperandNamed(it) => &it.syntax,
7956            AsmPiece::AsmOptions(it) => &it.syntax,
7957        }
7958    }
7959}
7960impl From<Const> for AssocItem {
7961    #[inline]
7962    fn from(node: Const) -> AssocItem { AssocItem::Const(node) }
7963}
7964impl From<Fn> for AssocItem {
7965    #[inline]
7966    fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
7967}
7968impl From<MacroCall> for AssocItem {
7969    #[inline]
7970    fn from(node: MacroCall) -> AssocItem { AssocItem::MacroCall(node) }
7971}
7972impl From<TypeAlias> for AssocItem {
7973    #[inline]
7974    fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) }
7975}
7976impl AstNode for AssocItem {
7977    #[inline]
7978    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CONST | FN | MACRO_CALL | TYPE_ALIAS) }
7979    #[inline]
7980    fn cast(syntax: SyntaxNode) -> Option<Self> {
7981        let res = match syntax.kind() {
7982            CONST => AssocItem::Const(Const { syntax }),
7983            FN => AssocItem::Fn(Fn { syntax }),
7984            MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
7985            TYPE_ALIAS => AssocItem::TypeAlias(TypeAlias { syntax }),
7986            _ => return None,
7987        };
7988        Some(res)
7989    }
7990    #[inline]
7991    fn syntax(&self) -> &SyntaxNode {
7992        match self {
7993            AssocItem::Const(it) => &it.syntax,
7994            AssocItem::Fn(it) => &it.syntax,
7995            AssocItem::MacroCall(it) => &it.syntax,
7996            AssocItem::TypeAlias(it) => &it.syntax,
7997        }
7998    }
7999}
8000impl From<ArrayExpr> for Expr {
8001    #[inline]
8002    fn from(node: ArrayExpr) -> Expr { Expr::ArrayExpr(node) }
8003}
8004impl From<AsmExpr> for Expr {
8005    #[inline]
8006    fn from(node: AsmExpr) -> Expr { Expr::AsmExpr(node) }
8007}
8008impl From<AwaitExpr> for Expr {
8009    #[inline]
8010    fn from(node: AwaitExpr) -> Expr { Expr::AwaitExpr(node) }
8011}
8012impl From<BecomeExpr> for Expr {
8013    #[inline]
8014    fn from(node: BecomeExpr) -> Expr { Expr::BecomeExpr(node) }
8015}
8016impl From<BinExpr> for Expr {
8017    #[inline]
8018    fn from(node: BinExpr) -> Expr { Expr::BinExpr(node) }
8019}
8020impl From<BlockExpr> for Expr {
8021    #[inline]
8022    fn from(node: BlockExpr) -> Expr { Expr::BlockExpr(node) }
8023}
8024impl From<BreakExpr> for Expr {
8025    #[inline]
8026    fn from(node: BreakExpr) -> Expr { Expr::BreakExpr(node) }
8027}
8028impl From<CallExpr> for Expr {
8029    #[inline]
8030    fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
8031}
8032impl From<CastExpr> for Expr {
8033    #[inline]
8034    fn from(node: CastExpr) -> Expr { Expr::CastExpr(node) }
8035}
8036impl From<ClosureExpr> for Expr {
8037    #[inline]
8038    fn from(node: ClosureExpr) -> Expr { Expr::ClosureExpr(node) }
8039}
8040impl From<ContinueExpr> for Expr {
8041    #[inline]
8042    fn from(node: ContinueExpr) -> Expr { Expr::ContinueExpr(node) }
8043}
8044impl From<FieldExpr> for Expr {
8045    #[inline]
8046    fn from(node: FieldExpr) -> Expr { Expr::FieldExpr(node) }
8047}
8048impl From<ForExpr> for Expr {
8049    #[inline]
8050    fn from(node: ForExpr) -> Expr { Expr::ForExpr(node) }
8051}
8052impl From<FormatArgsExpr> for Expr {
8053    #[inline]
8054    fn from(node: FormatArgsExpr) -> Expr { Expr::FormatArgsExpr(node) }
8055}
8056impl From<IfExpr> for Expr {
8057    #[inline]
8058    fn from(node: IfExpr) -> Expr { Expr::IfExpr(node) }
8059}
8060impl From<IndexExpr> for Expr {
8061    #[inline]
8062    fn from(node: IndexExpr) -> Expr { Expr::IndexExpr(node) }
8063}
8064impl From<LetExpr> for Expr {
8065    #[inline]
8066    fn from(node: LetExpr) -> Expr { Expr::LetExpr(node) }
8067}
8068impl From<Literal> for Expr {
8069    #[inline]
8070    fn from(node: Literal) -> Expr { Expr::Literal(node) }
8071}
8072impl From<LoopExpr> for Expr {
8073    #[inline]
8074    fn from(node: LoopExpr) -> Expr { Expr::LoopExpr(node) }
8075}
8076impl From<MacroExpr> for Expr {
8077    #[inline]
8078    fn from(node: MacroExpr) -> Expr { Expr::MacroExpr(node) }
8079}
8080impl From<MatchExpr> for Expr {
8081    #[inline]
8082    fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) }
8083}
8084impl From<MethodCallExpr> for Expr {
8085    #[inline]
8086    fn from(node: MethodCallExpr) -> Expr { Expr::MethodCallExpr(node) }
8087}
8088impl From<OffsetOfExpr> for Expr {
8089    #[inline]
8090    fn from(node: OffsetOfExpr) -> Expr { Expr::OffsetOfExpr(node) }
8091}
8092impl From<ParenExpr> for Expr {
8093    #[inline]
8094    fn from(node: ParenExpr) -> Expr { Expr::ParenExpr(node) }
8095}
8096impl From<PathExpr> for Expr {
8097    #[inline]
8098    fn from(node: PathExpr) -> Expr { Expr::PathExpr(node) }
8099}
8100impl From<PrefixExpr> for Expr {
8101    #[inline]
8102    fn from(node: PrefixExpr) -> Expr { Expr::PrefixExpr(node) }
8103}
8104impl From<RangeExpr> for Expr {
8105    #[inline]
8106    fn from(node: RangeExpr) -> Expr { Expr::RangeExpr(node) }
8107}
8108impl From<RecordExpr> for Expr {
8109    #[inline]
8110    fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) }
8111}
8112impl From<RefExpr> for Expr {
8113    #[inline]
8114    fn from(node: RefExpr) -> Expr { Expr::RefExpr(node) }
8115}
8116impl From<ReturnExpr> for Expr {
8117    #[inline]
8118    fn from(node: ReturnExpr) -> Expr { Expr::ReturnExpr(node) }
8119}
8120impl From<TryExpr> for Expr {
8121    #[inline]
8122    fn from(node: TryExpr) -> Expr { Expr::TryExpr(node) }
8123}
8124impl From<TupleExpr> for Expr {
8125    #[inline]
8126    fn from(node: TupleExpr) -> Expr { Expr::TupleExpr(node) }
8127}
8128impl From<UnderscoreExpr> for Expr {
8129    #[inline]
8130    fn from(node: UnderscoreExpr) -> Expr { Expr::UnderscoreExpr(node) }
8131}
8132impl From<WhileExpr> for Expr {
8133    #[inline]
8134    fn from(node: WhileExpr) -> Expr { Expr::WhileExpr(node) }
8135}
8136impl From<YeetExpr> for Expr {
8137    #[inline]
8138    fn from(node: YeetExpr) -> Expr { Expr::YeetExpr(node) }
8139}
8140impl From<YieldExpr> for Expr {
8141    #[inline]
8142    fn from(node: YieldExpr) -> Expr { Expr::YieldExpr(node) }
8143}
8144impl AstNode for Expr {
8145    #[inline]
8146    fn can_cast(kind: SyntaxKind) -> bool {
8147        matches!(
8148            kind,
8149            ARRAY_EXPR
8150                | ASM_EXPR
8151                | AWAIT_EXPR
8152                | BECOME_EXPR
8153                | BIN_EXPR
8154                | BLOCK_EXPR
8155                | BREAK_EXPR
8156                | CALL_EXPR
8157                | CAST_EXPR
8158                | CLOSURE_EXPR
8159                | CONTINUE_EXPR
8160                | FIELD_EXPR
8161                | FOR_EXPR
8162                | FORMAT_ARGS_EXPR
8163                | IF_EXPR
8164                | INDEX_EXPR
8165                | LET_EXPR
8166                | LITERAL
8167                | LOOP_EXPR
8168                | MACRO_EXPR
8169                | MATCH_EXPR
8170                | METHOD_CALL_EXPR
8171                | OFFSET_OF_EXPR
8172                | PAREN_EXPR
8173                | PATH_EXPR
8174                | PREFIX_EXPR
8175                | RANGE_EXPR
8176                | RECORD_EXPR
8177                | REF_EXPR
8178                | RETURN_EXPR
8179                | TRY_EXPR
8180                | TUPLE_EXPR
8181                | UNDERSCORE_EXPR
8182                | WHILE_EXPR
8183                | YEET_EXPR
8184                | YIELD_EXPR
8185        )
8186    }
8187    #[inline]
8188    fn cast(syntax: SyntaxNode) -> Option<Self> {
8189        let res = match syntax.kind() {
8190            ARRAY_EXPR => Expr::ArrayExpr(ArrayExpr { syntax }),
8191            ASM_EXPR => Expr::AsmExpr(AsmExpr { syntax }),
8192            AWAIT_EXPR => Expr::AwaitExpr(AwaitExpr { syntax }),
8193            BECOME_EXPR => Expr::BecomeExpr(BecomeExpr { syntax }),
8194            BIN_EXPR => Expr::BinExpr(BinExpr { syntax }),
8195            BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
8196            BREAK_EXPR => Expr::BreakExpr(BreakExpr { syntax }),
8197            CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
8198            CAST_EXPR => Expr::CastExpr(CastExpr { syntax }),
8199            CLOSURE_EXPR => Expr::ClosureExpr(ClosureExpr { syntax }),
8200            CONTINUE_EXPR => Expr::ContinueExpr(ContinueExpr { syntax }),
8201            FIELD_EXPR => Expr::FieldExpr(FieldExpr { syntax }),
8202            FOR_EXPR => Expr::ForExpr(ForExpr { syntax }),
8203            FORMAT_ARGS_EXPR => Expr::FormatArgsExpr(FormatArgsExpr { syntax }),
8204            IF_EXPR => Expr::IfExpr(IfExpr { syntax }),
8205            INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
8206            LET_EXPR => Expr::LetExpr(LetExpr { syntax }),
8207            LITERAL => Expr::Literal(Literal { syntax }),
8208            LOOP_EXPR => Expr::LoopExpr(LoopExpr { syntax }),
8209            MACRO_EXPR => Expr::MacroExpr(MacroExpr { syntax }),
8210            MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }),
8211            METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }),
8212            OFFSET_OF_EXPR => Expr::OffsetOfExpr(OffsetOfExpr { syntax }),
8213            PAREN_EXPR => Expr::ParenExpr(ParenExpr { syntax }),
8214            PATH_EXPR => Expr::PathExpr(PathExpr { syntax }),
8215            PREFIX_EXPR => Expr::PrefixExpr(PrefixExpr { syntax }),
8216            RANGE_EXPR => Expr::RangeExpr(RangeExpr { syntax }),
8217            RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }),
8218            REF_EXPR => Expr::RefExpr(RefExpr { syntax }),
8219            RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
8220            TRY_EXPR => Expr::TryExpr(TryExpr { syntax }),
8221            TUPLE_EXPR => Expr::TupleExpr(TupleExpr { syntax }),
8222            UNDERSCORE_EXPR => Expr::UnderscoreExpr(UnderscoreExpr { syntax }),
8223            WHILE_EXPR => Expr::WhileExpr(WhileExpr { syntax }),
8224            YEET_EXPR => Expr::YeetExpr(YeetExpr { syntax }),
8225            YIELD_EXPR => Expr::YieldExpr(YieldExpr { syntax }),
8226            _ => return None,
8227        };
8228        Some(res)
8229    }
8230    #[inline]
8231    fn syntax(&self) -> &SyntaxNode {
8232        match self {
8233            Expr::ArrayExpr(it) => &it.syntax,
8234            Expr::AsmExpr(it) => &it.syntax,
8235            Expr::AwaitExpr(it) => &it.syntax,
8236            Expr::BecomeExpr(it) => &it.syntax,
8237            Expr::BinExpr(it) => &it.syntax,
8238            Expr::BlockExpr(it) => &it.syntax,
8239            Expr::BreakExpr(it) => &it.syntax,
8240            Expr::CallExpr(it) => &it.syntax,
8241            Expr::CastExpr(it) => &it.syntax,
8242            Expr::ClosureExpr(it) => &it.syntax,
8243            Expr::ContinueExpr(it) => &it.syntax,
8244            Expr::FieldExpr(it) => &it.syntax,
8245            Expr::ForExpr(it) => &it.syntax,
8246            Expr::FormatArgsExpr(it) => &it.syntax,
8247            Expr::IfExpr(it) => &it.syntax,
8248            Expr::IndexExpr(it) => &it.syntax,
8249            Expr::LetExpr(it) => &it.syntax,
8250            Expr::Literal(it) => &it.syntax,
8251            Expr::LoopExpr(it) => &it.syntax,
8252            Expr::MacroExpr(it) => &it.syntax,
8253            Expr::MatchExpr(it) => &it.syntax,
8254            Expr::MethodCallExpr(it) => &it.syntax,
8255            Expr::OffsetOfExpr(it) => &it.syntax,
8256            Expr::ParenExpr(it) => &it.syntax,
8257            Expr::PathExpr(it) => &it.syntax,
8258            Expr::PrefixExpr(it) => &it.syntax,
8259            Expr::RangeExpr(it) => &it.syntax,
8260            Expr::RecordExpr(it) => &it.syntax,
8261            Expr::RefExpr(it) => &it.syntax,
8262            Expr::ReturnExpr(it) => &it.syntax,
8263            Expr::TryExpr(it) => &it.syntax,
8264            Expr::TupleExpr(it) => &it.syntax,
8265            Expr::UnderscoreExpr(it) => &it.syntax,
8266            Expr::WhileExpr(it) => &it.syntax,
8267            Expr::YeetExpr(it) => &it.syntax,
8268            Expr::YieldExpr(it) => &it.syntax,
8269        }
8270    }
8271}
8272impl From<Fn> for ExternItem {
8273    #[inline]
8274    fn from(node: Fn) -> ExternItem { ExternItem::Fn(node) }
8275}
8276impl From<MacroCall> for ExternItem {
8277    #[inline]
8278    fn from(node: MacroCall) -> ExternItem { ExternItem::MacroCall(node) }
8279}
8280impl From<Static> for ExternItem {
8281    #[inline]
8282    fn from(node: Static) -> ExternItem { ExternItem::Static(node) }
8283}
8284impl From<TypeAlias> for ExternItem {
8285    #[inline]
8286    fn from(node: TypeAlias) -> ExternItem { ExternItem::TypeAlias(node) }
8287}
8288impl AstNode for ExternItem {
8289    #[inline]
8290    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, FN | MACRO_CALL | STATIC | TYPE_ALIAS) }
8291    #[inline]
8292    fn cast(syntax: SyntaxNode) -> Option<Self> {
8293        let res = match syntax.kind() {
8294            FN => ExternItem::Fn(Fn { syntax }),
8295            MACRO_CALL => ExternItem::MacroCall(MacroCall { syntax }),
8296            STATIC => ExternItem::Static(Static { syntax }),
8297            TYPE_ALIAS => ExternItem::TypeAlias(TypeAlias { syntax }),
8298            _ => return None,
8299        };
8300        Some(res)
8301    }
8302    #[inline]
8303    fn syntax(&self) -> &SyntaxNode {
8304        match self {
8305            ExternItem::Fn(it) => &it.syntax,
8306            ExternItem::MacroCall(it) => &it.syntax,
8307            ExternItem::Static(it) => &it.syntax,
8308            ExternItem::TypeAlias(it) => &it.syntax,
8309        }
8310    }
8311}
8312impl From<RecordFieldList> for FieldList {
8313    #[inline]
8314    fn from(node: RecordFieldList) -> FieldList { FieldList::RecordFieldList(node) }
8315}
8316impl From<TupleFieldList> for FieldList {
8317    #[inline]
8318    fn from(node: TupleFieldList) -> FieldList { FieldList::TupleFieldList(node) }
8319}
8320impl AstNode for FieldList {
8321    #[inline]
8322    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, RECORD_FIELD_LIST | TUPLE_FIELD_LIST) }
8323    #[inline]
8324    fn cast(syntax: SyntaxNode) -> Option<Self> {
8325        let res = match syntax.kind() {
8326            RECORD_FIELD_LIST => FieldList::RecordFieldList(RecordFieldList { syntax }),
8327            TUPLE_FIELD_LIST => FieldList::TupleFieldList(TupleFieldList { syntax }),
8328            _ => return None,
8329        };
8330        Some(res)
8331    }
8332    #[inline]
8333    fn syntax(&self) -> &SyntaxNode {
8334        match self {
8335            FieldList::RecordFieldList(it) => &it.syntax,
8336            FieldList::TupleFieldList(it) => &it.syntax,
8337        }
8338    }
8339}
8340impl From<AssocTypeArg> for GenericArg {
8341    #[inline]
8342    fn from(node: AssocTypeArg) -> GenericArg { GenericArg::AssocTypeArg(node) }
8343}
8344impl From<ConstArg> for GenericArg {
8345    #[inline]
8346    fn from(node: ConstArg) -> GenericArg { GenericArg::ConstArg(node) }
8347}
8348impl From<LifetimeArg> for GenericArg {
8349    #[inline]
8350    fn from(node: LifetimeArg) -> GenericArg { GenericArg::LifetimeArg(node) }
8351}
8352impl From<TypeArg> for GenericArg {
8353    #[inline]
8354    fn from(node: TypeArg) -> GenericArg { GenericArg::TypeArg(node) }
8355}
8356impl AstNode for GenericArg {
8357    #[inline]
8358    fn can_cast(kind: SyntaxKind) -> bool {
8359        matches!(kind, ASSOC_TYPE_ARG | CONST_ARG | LIFETIME_ARG | TYPE_ARG)
8360    }
8361    #[inline]
8362    fn cast(syntax: SyntaxNode) -> Option<Self> {
8363        let res = match syntax.kind() {
8364            ASSOC_TYPE_ARG => GenericArg::AssocTypeArg(AssocTypeArg { syntax }),
8365            CONST_ARG => GenericArg::ConstArg(ConstArg { syntax }),
8366            LIFETIME_ARG => GenericArg::LifetimeArg(LifetimeArg { syntax }),
8367            TYPE_ARG => GenericArg::TypeArg(TypeArg { syntax }),
8368            _ => return None,
8369        };
8370        Some(res)
8371    }
8372    #[inline]
8373    fn syntax(&self) -> &SyntaxNode {
8374        match self {
8375            GenericArg::AssocTypeArg(it) => &it.syntax,
8376            GenericArg::ConstArg(it) => &it.syntax,
8377            GenericArg::LifetimeArg(it) => &it.syntax,
8378            GenericArg::TypeArg(it) => &it.syntax,
8379        }
8380    }
8381}
8382impl From<ConstParam> for GenericParam {
8383    #[inline]
8384    fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) }
8385}
8386impl From<LifetimeParam> for GenericParam {
8387    #[inline]
8388    fn from(node: LifetimeParam) -> GenericParam { GenericParam::LifetimeParam(node) }
8389}
8390impl From<TypeParam> for GenericParam {
8391    #[inline]
8392    fn from(node: TypeParam) -> GenericParam { GenericParam::TypeParam(node) }
8393}
8394impl AstNode for GenericParam {
8395    #[inline]
8396    fn can_cast(kind: SyntaxKind) -> bool {
8397        matches!(kind, CONST_PARAM | LIFETIME_PARAM | TYPE_PARAM)
8398    }
8399    #[inline]
8400    fn cast(syntax: SyntaxNode) -> Option<Self> {
8401        let res = match syntax.kind() {
8402            CONST_PARAM => GenericParam::ConstParam(ConstParam { syntax }),
8403            LIFETIME_PARAM => GenericParam::LifetimeParam(LifetimeParam { syntax }),
8404            TYPE_PARAM => GenericParam::TypeParam(TypeParam { syntax }),
8405            _ => return None,
8406        };
8407        Some(res)
8408    }
8409    #[inline]
8410    fn syntax(&self) -> &SyntaxNode {
8411        match self {
8412            GenericParam::ConstParam(it) => &it.syntax,
8413            GenericParam::LifetimeParam(it) => &it.syntax,
8414            GenericParam::TypeParam(it) => &it.syntax,
8415        }
8416    }
8417}
8418impl From<AsmExpr> for Item {
8419    #[inline]
8420    fn from(node: AsmExpr) -> Item { Item::AsmExpr(node) }
8421}
8422impl From<Const> for Item {
8423    #[inline]
8424    fn from(node: Const) -> Item { Item::Const(node) }
8425}
8426impl From<Enum> for Item {
8427    #[inline]
8428    fn from(node: Enum) -> Item { Item::Enum(node) }
8429}
8430impl From<ExternBlock> for Item {
8431    #[inline]
8432    fn from(node: ExternBlock) -> Item { Item::ExternBlock(node) }
8433}
8434impl From<ExternCrate> for Item {
8435    #[inline]
8436    fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) }
8437}
8438impl From<Fn> for Item {
8439    #[inline]
8440    fn from(node: Fn) -> Item { Item::Fn(node) }
8441}
8442impl From<Impl> for Item {
8443    #[inline]
8444    fn from(node: Impl) -> Item { Item::Impl(node) }
8445}
8446impl From<MacroCall> for Item {
8447    #[inline]
8448    fn from(node: MacroCall) -> Item { Item::MacroCall(node) }
8449}
8450impl From<MacroDef> for Item {
8451    #[inline]
8452    fn from(node: MacroDef) -> Item { Item::MacroDef(node) }
8453}
8454impl From<MacroRules> for Item {
8455    #[inline]
8456    fn from(node: MacroRules) -> Item { Item::MacroRules(node) }
8457}
8458impl From<Module> for Item {
8459    #[inline]
8460    fn from(node: Module) -> Item { Item::Module(node) }
8461}
8462impl From<Static> for Item {
8463    #[inline]
8464    fn from(node: Static) -> Item { Item::Static(node) }
8465}
8466impl From<Struct> for Item {
8467    #[inline]
8468    fn from(node: Struct) -> Item { Item::Struct(node) }
8469}
8470impl From<Trait> for Item {
8471    #[inline]
8472    fn from(node: Trait) -> Item { Item::Trait(node) }
8473}
8474impl From<TraitAlias> for Item {
8475    #[inline]
8476    fn from(node: TraitAlias) -> Item { Item::TraitAlias(node) }
8477}
8478impl From<TypeAlias> for Item {
8479    #[inline]
8480    fn from(node: TypeAlias) -> Item { Item::TypeAlias(node) }
8481}
8482impl From<Union> for Item {
8483    #[inline]
8484    fn from(node: Union) -> Item { Item::Union(node) }
8485}
8486impl From<Use> for Item {
8487    #[inline]
8488    fn from(node: Use) -> Item { Item::Use(node) }
8489}
8490impl AstNode for Item {
8491    #[inline]
8492    fn can_cast(kind: SyntaxKind) -> bool {
8493        matches!(
8494            kind,
8495            ASM_EXPR
8496                | CONST
8497                | ENUM
8498                | EXTERN_BLOCK
8499                | EXTERN_CRATE
8500                | FN
8501                | IMPL
8502                | MACRO_CALL
8503                | MACRO_DEF
8504                | MACRO_RULES
8505                | MODULE
8506                | STATIC
8507                | STRUCT
8508                | TRAIT
8509                | TRAIT_ALIAS
8510                | TYPE_ALIAS
8511                | UNION
8512                | USE
8513        )
8514    }
8515    #[inline]
8516    fn cast(syntax: SyntaxNode) -> Option<Self> {
8517        let res = match syntax.kind() {
8518            ASM_EXPR => Item::AsmExpr(AsmExpr { syntax }),
8519            CONST => Item::Const(Const { syntax }),
8520            ENUM => Item::Enum(Enum { syntax }),
8521            EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }),
8522            EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }),
8523            FN => Item::Fn(Fn { syntax }),
8524            IMPL => Item::Impl(Impl { syntax }),
8525            MACRO_CALL => Item::MacroCall(MacroCall { syntax }),
8526            MACRO_DEF => Item::MacroDef(MacroDef { syntax }),
8527            MACRO_RULES => Item::MacroRules(MacroRules { syntax }),
8528            MODULE => Item::Module(Module { syntax }),
8529            STATIC => Item::Static(Static { syntax }),
8530            STRUCT => Item::Struct(Struct { syntax }),
8531            TRAIT => Item::Trait(Trait { syntax }),
8532            TRAIT_ALIAS => Item::TraitAlias(TraitAlias { syntax }),
8533            TYPE_ALIAS => Item::TypeAlias(TypeAlias { syntax }),
8534            UNION => Item::Union(Union { syntax }),
8535            USE => Item::Use(Use { syntax }),
8536            _ => return None,
8537        };
8538        Some(res)
8539    }
8540    #[inline]
8541    fn syntax(&self) -> &SyntaxNode {
8542        match self {
8543            Item::AsmExpr(it) => &it.syntax,
8544            Item::Const(it) => &it.syntax,
8545            Item::Enum(it) => &it.syntax,
8546            Item::ExternBlock(it) => &it.syntax,
8547            Item::ExternCrate(it) => &it.syntax,
8548            Item::Fn(it) => &it.syntax,
8549            Item::Impl(it) => &it.syntax,
8550            Item::MacroCall(it) => &it.syntax,
8551            Item::MacroDef(it) => &it.syntax,
8552            Item::MacroRules(it) => &it.syntax,
8553            Item::Module(it) => &it.syntax,
8554            Item::Static(it) => &it.syntax,
8555            Item::Struct(it) => &it.syntax,
8556            Item::Trait(it) => &it.syntax,
8557            Item::TraitAlias(it) => &it.syntax,
8558            Item::TypeAlias(it) => &it.syntax,
8559            Item::Union(it) => &it.syntax,
8560            Item::Use(it) => &it.syntax,
8561        }
8562    }
8563}
8564impl From<BoxPat> for Pat {
8565    #[inline]
8566    fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
8567}
8568impl From<ConstBlockPat> for Pat {
8569    #[inline]
8570    fn from(node: ConstBlockPat) -> Pat { Pat::ConstBlockPat(node) }
8571}
8572impl From<IdentPat> for Pat {
8573    #[inline]
8574    fn from(node: IdentPat) -> Pat { Pat::IdentPat(node) }
8575}
8576impl From<LiteralPat> for Pat {
8577    #[inline]
8578    fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
8579}
8580impl From<MacroPat> for Pat {
8581    #[inline]
8582    fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) }
8583}
8584impl From<OrPat> for Pat {
8585    #[inline]
8586    fn from(node: OrPat) -> Pat { Pat::OrPat(node) }
8587}
8588impl From<ParenPat> for Pat {
8589    #[inline]
8590    fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) }
8591}
8592impl From<PathPat> for Pat {
8593    #[inline]
8594    fn from(node: PathPat) -> Pat { Pat::PathPat(node) }
8595}
8596impl From<RangePat> for Pat {
8597    #[inline]
8598    fn from(node: RangePat) -> Pat { Pat::RangePat(node) }
8599}
8600impl From<RecordPat> for Pat {
8601    #[inline]
8602    fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) }
8603}
8604impl From<RefPat> for Pat {
8605    #[inline]
8606    fn from(node: RefPat) -> Pat { Pat::RefPat(node) }
8607}
8608impl From<RestPat> for Pat {
8609    #[inline]
8610    fn from(node: RestPat) -> Pat { Pat::RestPat(node) }
8611}
8612impl From<SlicePat> for Pat {
8613    #[inline]
8614    fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) }
8615}
8616impl From<TuplePat> for Pat {
8617    #[inline]
8618    fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) }
8619}
8620impl From<TupleStructPat> for Pat {
8621    #[inline]
8622    fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) }
8623}
8624impl From<WildcardPat> for Pat {
8625    #[inline]
8626    fn from(node: WildcardPat) -> Pat { Pat::WildcardPat(node) }
8627}
8628impl AstNode for Pat {
8629    #[inline]
8630    fn can_cast(kind: SyntaxKind) -> bool {
8631        matches!(
8632            kind,
8633            BOX_PAT
8634                | CONST_BLOCK_PAT
8635                | IDENT_PAT
8636                | LITERAL_PAT
8637                | MACRO_PAT
8638                | OR_PAT
8639                | PAREN_PAT
8640                | PATH_PAT
8641                | RANGE_PAT
8642                | RECORD_PAT
8643                | REF_PAT
8644                | REST_PAT
8645                | SLICE_PAT
8646                | TUPLE_PAT
8647                | TUPLE_STRUCT_PAT
8648                | WILDCARD_PAT
8649        )
8650    }
8651    #[inline]
8652    fn cast(syntax: SyntaxNode) -> Option<Self> {
8653        let res = match syntax.kind() {
8654            BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
8655            CONST_BLOCK_PAT => Pat::ConstBlockPat(ConstBlockPat { syntax }),
8656            IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
8657            LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
8658            MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
8659            OR_PAT => Pat::OrPat(OrPat { syntax }),
8660            PAREN_PAT => Pat::ParenPat(ParenPat { syntax }),
8661            PATH_PAT => Pat::PathPat(PathPat { syntax }),
8662            RANGE_PAT => Pat::RangePat(RangePat { syntax }),
8663            RECORD_PAT => Pat::RecordPat(RecordPat { syntax }),
8664            REF_PAT => Pat::RefPat(RefPat { syntax }),
8665            REST_PAT => Pat::RestPat(RestPat { syntax }),
8666            SLICE_PAT => Pat::SlicePat(SlicePat { syntax }),
8667            TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }),
8668            TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }),
8669            WILDCARD_PAT => Pat::WildcardPat(WildcardPat { syntax }),
8670            _ => return None,
8671        };
8672        Some(res)
8673    }
8674    #[inline]
8675    fn syntax(&self) -> &SyntaxNode {
8676        match self {
8677            Pat::BoxPat(it) => &it.syntax,
8678            Pat::ConstBlockPat(it) => &it.syntax,
8679            Pat::IdentPat(it) => &it.syntax,
8680            Pat::LiteralPat(it) => &it.syntax,
8681            Pat::MacroPat(it) => &it.syntax,
8682            Pat::OrPat(it) => &it.syntax,
8683            Pat::ParenPat(it) => &it.syntax,
8684            Pat::PathPat(it) => &it.syntax,
8685            Pat::RangePat(it) => &it.syntax,
8686            Pat::RecordPat(it) => &it.syntax,
8687            Pat::RefPat(it) => &it.syntax,
8688            Pat::RestPat(it) => &it.syntax,
8689            Pat::SlicePat(it) => &it.syntax,
8690            Pat::TuplePat(it) => &it.syntax,
8691            Pat::TupleStructPat(it) => &it.syntax,
8692            Pat::WildcardPat(it) => &it.syntax,
8693        }
8694    }
8695}
8696impl From<ExprStmt> for Stmt {
8697    #[inline]
8698    fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) }
8699}
8700impl From<Item> for Stmt {
8701    #[inline]
8702    fn from(node: Item) -> Stmt { Stmt::Item(node) }
8703}
8704impl From<LetStmt> for Stmt {
8705    #[inline]
8706    fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
8707}
8708impl From<ArrayType> for Type {
8709    #[inline]
8710    fn from(node: ArrayType) -> Type { Type::ArrayType(node) }
8711}
8712impl From<DynTraitType> for Type {
8713    #[inline]
8714    fn from(node: DynTraitType) -> Type { Type::DynTraitType(node) }
8715}
8716impl From<FnPtrType> for Type {
8717    #[inline]
8718    fn from(node: FnPtrType) -> Type { Type::FnPtrType(node) }
8719}
8720impl From<ForType> for Type {
8721    #[inline]
8722    fn from(node: ForType) -> Type { Type::ForType(node) }
8723}
8724impl From<ImplTraitType> for Type {
8725    #[inline]
8726    fn from(node: ImplTraitType) -> Type { Type::ImplTraitType(node) }
8727}
8728impl From<InferType> for Type {
8729    #[inline]
8730    fn from(node: InferType) -> Type { Type::InferType(node) }
8731}
8732impl From<MacroType> for Type {
8733    #[inline]
8734    fn from(node: MacroType) -> Type { Type::MacroType(node) }
8735}
8736impl From<NeverType> for Type {
8737    #[inline]
8738    fn from(node: NeverType) -> Type { Type::NeverType(node) }
8739}
8740impl From<ParenType> for Type {
8741    #[inline]
8742    fn from(node: ParenType) -> Type { Type::ParenType(node) }
8743}
8744impl From<PathType> for Type {
8745    #[inline]
8746    fn from(node: PathType) -> Type { Type::PathType(node) }
8747}
8748impl From<PtrType> for Type {
8749    #[inline]
8750    fn from(node: PtrType) -> Type { Type::PtrType(node) }
8751}
8752impl From<RefType> for Type {
8753    #[inline]
8754    fn from(node: RefType) -> Type { Type::RefType(node) }
8755}
8756impl From<SliceType> for Type {
8757    #[inline]
8758    fn from(node: SliceType) -> Type { Type::SliceType(node) }
8759}
8760impl From<TupleType> for Type {
8761    #[inline]
8762    fn from(node: TupleType) -> Type { Type::TupleType(node) }
8763}
8764impl AstNode for Type {
8765    #[inline]
8766    fn can_cast(kind: SyntaxKind) -> bool {
8767        matches!(
8768            kind,
8769            ARRAY_TYPE
8770                | DYN_TRAIT_TYPE
8771                | FN_PTR_TYPE
8772                | FOR_TYPE
8773                | IMPL_TRAIT_TYPE
8774                | INFER_TYPE
8775                | MACRO_TYPE
8776                | NEVER_TYPE
8777                | PAREN_TYPE
8778                | PATH_TYPE
8779                | PTR_TYPE
8780                | REF_TYPE
8781                | SLICE_TYPE
8782                | TUPLE_TYPE
8783        )
8784    }
8785    #[inline]
8786    fn cast(syntax: SyntaxNode) -> Option<Self> {
8787        let res = match syntax.kind() {
8788            ARRAY_TYPE => Type::ArrayType(ArrayType { syntax }),
8789            DYN_TRAIT_TYPE => Type::DynTraitType(DynTraitType { syntax }),
8790            FN_PTR_TYPE => Type::FnPtrType(FnPtrType { syntax }),
8791            FOR_TYPE => Type::ForType(ForType { syntax }),
8792            IMPL_TRAIT_TYPE => Type::ImplTraitType(ImplTraitType { syntax }),
8793            INFER_TYPE => Type::InferType(InferType { syntax }),
8794            MACRO_TYPE => Type::MacroType(MacroType { syntax }),
8795            NEVER_TYPE => Type::NeverType(NeverType { syntax }),
8796            PAREN_TYPE => Type::ParenType(ParenType { syntax }),
8797            PATH_TYPE => Type::PathType(PathType { syntax }),
8798            PTR_TYPE => Type::PtrType(PtrType { syntax }),
8799            REF_TYPE => Type::RefType(RefType { syntax }),
8800            SLICE_TYPE => Type::SliceType(SliceType { syntax }),
8801            TUPLE_TYPE => Type::TupleType(TupleType { syntax }),
8802            _ => return None,
8803        };
8804        Some(res)
8805    }
8806    #[inline]
8807    fn syntax(&self) -> &SyntaxNode {
8808        match self {
8809            Type::ArrayType(it) => &it.syntax,
8810            Type::DynTraitType(it) => &it.syntax,
8811            Type::FnPtrType(it) => &it.syntax,
8812            Type::ForType(it) => &it.syntax,
8813            Type::ImplTraitType(it) => &it.syntax,
8814            Type::InferType(it) => &it.syntax,
8815            Type::MacroType(it) => &it.syntax,
8816            Type::NeverType(it) => &it.syntax,
8817            Type::ParenType(it) => &it.syntax,
8818            Type::PathType(it) => &it.syntax,
8819            Type::PtrType(it) => &it.syntax,
8820            Type::RefType(it) => &it.syntax,
8821            Type::SliceType(it) => &it.syntax,
8822            Type::TupleType(it) => &it.syntax,
8823        }
8824    }
8825}
8826impl From<Lifetime> for UseBoundGenericArg {
8827    #[inline]
8828    fn from(node: Lifetime) -> UseBoundGenericArg { UseBoundGenericArg::Lifetime(node) }
8829}
8830impl From<NameRef> for UseBoundGenericArg {
8831    #[inline]
8832    fn from(node: NameRef) -> UseBoundGenericArg { UseBoundGenericArg::NameRef(node) }
8833}
8834impl AstNode for UseBoundGenericArg {
8835    #[inline]
8836    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, LIFETIME | NAME_REF) }
8837    #[inline]
8838    fn cast(syntax: SyntaxNode) -> Option<Self> {
8839        let res = match syntax.kind() {
8840            LIFETIME => UseBoundGenericArg::Lifetime(Lifetime { syntax }),
8841            NAME_REF => UseBoundGenericArg::NameRef(NameRef { syntax }),
8842            _ => return None,
8843        };
8844        Some(res)
8845    }
8846    #[inline]
8847    fn syntax(&self) -> &SyntaxNode {
8848        match self {
8849            UseBoundGenericArg::Lifetime(it) => &it.syntax,
8850            UseBoundGenericArg::NameRef(it) => &it.syntax,
8851        }
8852    }
8853}
8854impl From<Struct> for VariantDef {
8855    #[inline]
8856    fn from(node: Struct) -> VariantDef { VariantDef::Struct(node) }
8857}
8858impl From<Union> for VariantDef {
8859    #[inline]
8860    fn from(node: Union) -> VariantDef { VariantDef::Union(node) }
8861}
8862impl From<Variant> for VariantDef {
8863    #[inline]
8864    fn from(node: Variant) -> VariantDef { VariantDef::Variant(node) }
8865}
8866impl AstNode for VariantDef {
8867    #[inline]
8868    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, STRUCT | UNION | VARIANT) }
8869    #[inline]
8870    fn cast(syntax: SyntaxNode) -> Option<Self> {
8871        let res = match syntax.kind() {
8872            STRUCT => VariantDef::Struct(Struct { syntax }),
8873            UNION => VariantDef::Union(Union { syntax }),
8874            VARIANT => VariantDef::Variant(Variant { syntax }),
8875            _ => return None,
8876        };
8877        Some(res)
8878    }
8879    #[inline]
8880    fn syntax(&self) -> &SyntaxNode {
8881        match self {
8882            VariantDef::Struct(it) => &it.syntax,
8883            VariantDef::Union(it) => &it.syntax,
8884            VariantDef::Variant(it) => &it.syntax,
8885        }
8886    }
8887}
8888impl ast::HasArgList for AnyHasArgList {}
8889impl AstNode for AnyHasArgList {
8890    #[inline]
8891    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CALL_EXPR | METHOD_CALL_EXPR) }
8892    #[inline]
8893    fn cast(syntax: SyntaxNode) -> Option<Self> {
8894        Self::can_cast(syntax.kind()).then_some(AnyHasArgList { syntax })
8895    }
8896    #[inline]
8897    fn syntax(&self) -> &SyntaxNode { &self.syntax }
8898}
8899impl hash::Hash for AnyHasArgList {
8900    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
8901}
8902impl Eq for AnyHasArgList {}
8903impl PartialEq for AnyHasArgList {
8904    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
8905}
8906impl Clone for AnyHasArgList {
8907    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
8908}
8909impl fmt::Debug for AnyHasArgList {
8910    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8911        f.debug_struct("AnyHasArgList").field("syntax", &self.syntax).finish()
8912    }
8913}
8914impl From<CallExpr> for AnyHasArgList {
8915    #[inline]
8916    fn from(node: CallExpr) -> AnyHasArgList { AnyHasArgList { syntax: node.syntax } }
8917}
8918impl From<MethodCallExpr> for AnyHasArgList {
8919    #[inline]
8920    fn from(node: MethodCallExpr) -> AnyHasArgList { AnyHasArgList { syntax: node.syntax } }
8921}
8922impl ast::HasAttrs for AnyHasAttrs {}
8923impl AstNode for AnyHasAttrs {
8924    #[inline]
8925    fn can_cast(kind: SyntaxKind) -> bool {
8926        matches!(
8927            kind,
8928            ARRAY_EXPR
8929                | ASM_EXPR
8930                | ASSOC_ITEM_LIST
8931                | AWAIT_EXPR
8932                | BECOME_EXPR
8933                | BIN_EXPR
8934                | BLOCK_EXPR
8935                | BREAK_EXPR
8936                | CALL_EXPR
8937                | CAST_EXPR
8938                | CLOSURE_EXPR
8939                | CONST
8940                | CONST_PARAM
8941                | CONTINUE_EXPR
8942                | ENUM
8943                | EXTERN_BLOCK
8944                | EXTERN_CRATE
8945                | EXTERN_ITEM_LIST
8946                | FIELD_EXPR
8947                | FN
8948                | FOR_EXPR
8949                | FORMAT_ARGS_EXPR
8950                | IDENT_PAT
8951                | IF_EXPR
8952                | IMPL
8953                | INDEX_EXPR
8954                | ITEM_LIST
8955                | LET_EXPR
8956                | LET_STMT
8957                | LIFETIME_PARAM
8958                | LITERAL
8959                | LOOP_EXPR
8960                | MACRO_CALL
8961                | MACRO_DEF
8962                | MACRO_RULES
8963                | MATCH_ARM
8964                | MATCH_ARM_LIST
8965                | MATCH_EXPR
8966                | METHOD_CALL_EXPR
8967                | MODULE
8968                | OFFSET_OF_EXPR
8969                | PARAM
8970                | PAREN_EXPR
8971                | PATH_EXPR
8972                | PREFIX_EXPR
8973                | RANGE_EXPR
8974                | RECORD_EXPR_FIELD
8975                | RECORD_EXPR_FIELD_LIST
8976                | RECORD_FIELD
8977                | RECORD_PAT_FIELD
8978                | REF_EXPR
8979                | REST_PAT
8980                | RETURN_EXPR
8981                | SELF_PARAM
8982                | SOURCE_FILE
8983                | STATIC
8984                | STMT_LIST
8985                | STRUCT
8986                | TRAIT
8987                | TRAIT_ALIAS
8988                | TRY_EXPR
8989                | TUPLE_EXPR
8990                | TUPLE_FIELD
8991                | TYPE_ALIAS
8992                | TYPE_PARAM
8993                | UNDERSCORE_EXPR
8994                | UNION
8995                | USE
8996                | VARIANT
8997                | WHILE_EXPR
8998                | YEET_EXPR
8999                | YIELD_EXPR
9000        )
9001    }
9002    #[inline]
9003    fn cast(syntax: SyntaxNode) -> Option<Self> {
9004        Self::can_cast(syntax.kind()).then_some(AnyHasAttrs { syntax })
9005    }
9006    #[inline]
9007    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9008}
9009impl hash::Hash for AnyHasAttrs {
9010    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9011}
9012impl Eq for AnyHasAttrs {}
9013impl PartialEq for AnyHasAttrs {
9014    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9015}
9016impl Clone for AnyHasAttrs {
9017    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9018}
9019impl fmt::Debug for AnyHasAttrs {
9020    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9021        f.debug_struct("AnyHasAttrs").field("syntax", &self.syntax).finish()
9022    }
9023}
9024impl From<ArrayExpr> for AnyHasAttrs {
9025    #[inline]
9026    fn from(node: ArrayExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9027}
9028impl From<AsmExpr> for AnyHasAttrs {
9029    #[inline]
9030    fn from(node: AsmExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9031}
9032impl From<AssocItemList> for AnyHasAttrs {
9033    #[inline]
9034    fn from(node: AssocItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9035}
9036impl From<AwaitExpr> for AnyHasAttrs {
9037    #[inline]
9038    fn from(node: AwaitExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9039}
9040impl From<BecomeExpr> for AnyHasAttrs {
9041    #[inline]
9042    fn from(node: BecomeExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9043}
9044impl From<BinExpr> for AnyHasAttrs {
9045    #[inline]
9046    fn from(node: BinExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9047}
9048impl From<BlockExpr> for AnyHasAttrs {
9049    #[inline]
9050    fn from(node: BlockExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9051}
9052impl From<BreakExpr> for AnyHasAttrs {
9053    #[inline]
9054    fn from(node: BreakExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9055}
9056impl From<CallExpr> for AnyHasAttrs {
9057    #[inline]
9058    fn from(node: CallExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9059}
9060impl From<CastExpr> for AnyHasAttrs {
9061    #[inline]
9062    fn from(node: CastExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9063}
9064impl From<ClosureExpr> for AnyHasAttrs {
9065    #[inline]
9066    fn from(node: ClosureExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9067}
9068impl From<Const> for AnyHasAttrs {
9069    #[inline]
9070    fn from(node: Const) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9071}
9072impl From<ConstParam> for AnyHasAttrs {
9073    #[inline]
9074    fn from(node: ConstParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9075}
9076impl From<ContinueExpr> for AnyHasAttrs {
9077    #[inline]
9078    fn from(node: ContinueExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9079}
9080impl From<Enum> for AnyHasAttrs {
9081    #[inline]
9082    fn from(node: Enum) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9083}
9084impl From<ExternBlock> for AnyHasAttrs {
9085    #[inline]
9086    fn from(node: ExternBlock) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9087}
9088impl From<ExternCrate> for AnyHasAttrs {
9089    #[inline]
9090    fn from(node: ExternCrate) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9091}
9092impl From<ExternItemList> for AnyHasAttrs {
9093    #[inline]
9094    fn from(node: ExternItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9095}
9096impl From<FieldExpr> for AnyHasAttrs {
9097    #[inline]
9098    fn from(node: FieldExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9099}
9100impl From<Fn> for AnyHasAttrs {
9101    #[inline]
9102    fn from(node: Fn) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9103}
9104impl From<ForExpr> for AnyHasAttrs {
9105    #[inline]
9106    fn from(node: ForExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9107}
9108impl From<FormatArgsExpr> for AnyHasAttrs {
9109    #[inline]
9110    fn from(node: FormatArgsExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9111}
9112impl From<IdentPat> for AnyHasAttrs {
9113    #[inline]
9114    fn from(node: IdentPat) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9115}
9116impl From<IfExpr> for AnyHasAttrs {
9117    #[inline]
9118    fn from(node: IfExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9119}
9120impl From<Impl> for AnyHasAttrs {
9121    #[inline]
9122    fn from(node: Impl) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9123}
9124impl From<IndexExpr> for AnyHasAttrs {
9125    #[inline]
9126    fn from(node: IndexExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9127}
9128impl From<ItemList> for AnyHasAttrs {
9129    #[inline]
9130    fn from(node: ItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9131}
9132impl From<LetExpr> for AnyHasAttrs {
9133    #[inline]
9134    fn from(node: LetExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9135}
9136impl From<LetStmt> for AnyHasAttrs {
9137    #[inline]
9138    fn from(node: LetStmt) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9139}
9140impl From<LifetimeParam> for AnyHasAttrs {
9141    #[inline]
9142    fn from(node: LifetimeParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9143}
9144impl From<Literal> for AnyHasAttrs {
9145    #[inline]
9146    fn from(node: Literal) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9147}
9148impl From<LoopExpr> for AnyHasAttrs {
9149    #[inline]
9150    fn from(node: LoopExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9151}
9152impl From<MacroCall> for AnyHasAttrs {
9153    #[inline]
9154    fn from(node: MacroCall) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9155}
9156impl From<MacroDef> for AnyHasAttrs {
9157    #[inline]
9158    fn from(node: MacroDef) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9159}
9160impl From<MacroRules> for AnyHasAttrs {
9161    #[inline]
9162    fn from(node: MacroRules) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9163}
9164impl From<MatchArm> for AnyHasAttrs {
9165    #[inline]
9166    fn from(node: MatchArm) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9167}
9168impl From<MatchArmList> for AnyHasAttrs {
9169    #[inline]
9170    fn from(node: MatchArmList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9171}
9172impl From<MatchExpr> for AnyHasAttrs {
9173    #[inline]
9174    fn from(node: MatchExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9175}
9176impl From<MethodCallExpr> for AnyHasAttrs {
9177    #[inline]
9178    fn from(node: MethodCallExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9179}
9180impl From<Module> for AnyHasAttrs {
9181    #[inline]
9182    fn from(node: Module) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9183}
9184impl From<OffsetOfExpr> for AnyHasAttrs {
9185    #[inline]
9186    fn from(node: OffsetOfExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9187}
9188impl From<Param> for AnyHasAttrs {
9189    #[inline]
9190    fn from(node: Param) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9191}
9192impl From<ParenExpr> for AnyHasAttrs {
9193    #[inline]
9194    fn from(node: ParenExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9195}
9196impl From<PathExpr> for AnyHasAttrs {
9197    #[inline]
9198    fn from(node: PathExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9199}
9200impl From<PrefixExpr> for AnyHasAttrs {
9201    #[inline]
9202    fn from(node: PrefixExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9203}
9204impl From<RangeExpr> for AnyHasAttrs {
9205    #[inline]
9206    fn from(node: RangeExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9207}
9208impl From<RecordExprField> for AnyHasAttrs {
9209    #[inline]
9210    fn from(node: RecordExprField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9211}
9212impl From<RecordExprFieldList> for AnyHasAttrs {
9213    #[inline]
9214    fn from(node: RecordExprFieldList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9215}
9216impl From<RecordField> for AnyHasAttrs {
9217    #[inline]
9218    fn from(node: RecordField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9219}
9220impl From<RecordPatField> for AnyHasAttrs {
9221    #[inline]
9222    fn from(node: RecordPatField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9223}
9224impl From<RefExpr> for AnyHasAttrs {
9225    #[inline]
9226    fn from(node: RefExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9227}
9228impl From<RestPat> for AnyHasAttrs {
9229    #[inline]
9230    fn from(node: RestPat) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9231}
9232impl From<ReturnExpr> for AnyHasAttrs {
9233    #[inline]
9234    fn from(node: ReturnExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9235}
9236impl From<SelfParam> for AnyHasAttrs {
9237    #[inline]
9238    fn from(node: SelfParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9239}
9240impl From<SourceFile> for AnyHasAttrs {
9241    #[inline]
9242    fn from(node: SourceFile) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9243}
9244impl From<Static> for AnyHasAttrs {
9245    #[inline]
9246    fn from(node: Static) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9247}
9248impl From<StmtList> for AnyHasAttrs {
9249    #[inline]
9250    fn from(node: StmtList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9251}
9252impl From<Struct> for AnyHasAttrs {
9253    #[inline]
9254    fn from(node: Struct) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9255}
9256impl From<Trait> for AnyHasAttrs {
9257    #[inline]
9258    fn from(node: Trait) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9259}
9260impl From<TraitAlias> for AnyHasAttrs {
9261    #[inline]
9262    fn from(node: TraitAlias) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9263}
9264impl From<TryExpr> for AnyHasAttrs {
9265    #[inline]
9266    fn from(node: TryExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9267}
9268impl From<TupleExpr> for AnyHasAttrs {
9269    #[inline]
9270    fn from(node: TupleExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9271}
9272impl From<TupleField> for AnyHasAttrs {
9273    #[inline]
9274    fn from(node: TupleField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9275}
9276impl From<TypeAlias> for AnyHasAttrs {
9277    #[inline]
9278    fn from(node: TypeAlias) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9279}
9280impl From<TypeParam> for AnyHasAttrs {
9281    #[inline]
9282    fn from(node: TypeParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9283}
9284impl From<UnderscoreExpr> for AnyHasAttrs {
9285    #[inline]
9286    fn from(node: UnderscoreExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9287}
9288impl From<Union> for AnyHasAttrs {
9289    #[inline]
9290    fn from(node: Union) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9291}
9292impl From<Use> for AnyHasAttrs {
9293    #[inline]
9294    fn from(node: Use) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9295}
9296impl From<Variant> for AnyHasAttrs {
9297    #[inline]
9298    fn from(node: Variant) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9299}
9300impl From<WhileExpr> for AnyHasAttrs {
9301    #[inline]
9302    fn from(node: WhileExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9303}
9304impl From<YeetExpr> for AnyHasAttrs {
9305    #[inline]
9306    fn from(node: YeetExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9307}
9308impl From<YieldExpr> for AnyHasAttrs {
9309    #[inline]
9310    fn from(node: YieldExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9311}
9312impl ast::HasDocComments for AnyHasDocComments {}
9313impl AstNode for AnyHasDocComments {
9314    #[inline]
9315    fn can_cast(kind: SyntaxKind) -> bool {
9316        matches!(
9317            kind,
9318            CONST
9319                | ENUM
9320                | EXTERN_BLOCK
9321                | EXTERN_CRATE
9322                | FN
9323                | IMPL
9324                | MACRO_CALL
9325                | MACRO_DEF
9326                | MACRO_RULES
9327                | MODULE
9328                | RECORD_FIELD
9329                | SOURCE_FILE
9330                | STATIC
9331                | STRUCT
9332                | TRAIT
9333                | TRAIT_ALIAS
9334                | TUPLE_FIELD
9335                | TYPE_ALIAS
9336                | UNION
9337                | USE
9338                | VARIANT
9339        )
9340    }
9341    #[inline]
9342    fn cast(syntax: SyntaxNode) -> Option<Self> {
9343        Self::can_cast(syntax.kind()).then_some(AnyHasDocComments { syntax })
9344    }
9345    #[inline]
9346    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9347}
9348impl hash::Hash for AnyHasDocComments {
9349    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9350}
9351impl Eq for AnyHasDocComments {}
9352impl PartialEq for AnyHasDocComments {
9353    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9354}
9355impl Clone for AnyHasDocComments {
9356    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9357}
9358impl fmt::Debug for AnyHasDocComments {
9359    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9360        f.debug_struct("AnyHasDocComments").field("syntax", &self.syntax).finish()
9361    }
9362}
9363impl From<Const> for AnyHasDocComments {
9364    #[inline]
9365    fn from(node: Const) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9366}
9367impl From<Enum> for AnyHasDocComments {
9368    #[inline]
9369    fn from(node: Enum) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9370}
9371impl From<ExternBlock> for AnyHasDocComments {
9372    #[inline]
9373    fn from(node: ExternBlock) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9374}
9375impl From<ExternCrate> for AnyHasDocComments {
9376    #[inline]
9377    fn from(node: ExternCrate) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9378}
9379impl From<Fn> for AnyHasDocComments {
9380    #[inline]
9381    fn from(node: Fn) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9382}
9383impl From<Impl> for AnyHasDocComments {
9384    #[inline]
9385    fn from(node: Impl) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9386}
9387impl From<MacroCall> for AnyHasDocComments {
9388    #[inline]
9389    fn from(node: MacroCall) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9390}
9391impl From<MacroDef> for AnyHasDocComments {
9392    #[inline]
9393    fn from(node: MacroDef) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9394}
9395impl From<MacroRules> for AnyHasDocComments {
9396    #[inline]
9397    fn from(node: MacroRules) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9398}
9399impl From<Module> for AnyHasDocComments {
9400    #[inline]
9401    fn from(node: Module) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9402}
9403impl From<RecordField> for AnyHasDocComments {
9404    #[inline]
9405    fn from(node: RecordField) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9406}
9407impl From<SourceFile> for AnyHasDocComments {
9408    #[inline]
9409    fn from(node: SourceFile) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9410}
9411impl From<Static> for AnyHasDocComments {
9412    #[inline]
9413    fn from(node: Static) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9414}
9415impl From<Struct> for AnyHasDocComments {
9416    #[inline]
9417    fn from(node: Struct) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9418}
9419impl From<Trait> for AnyHasDocComments {
9420    #[inline]
9421    fn from(node: Trait) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9422}
9423impl From<TraitAlias> for AnyHasDocComments {
9424    #[inline]
9425    fn from(node: TraitAlias) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9426}
9427impl From<TupleField> for AnyHasDocComments {
9428    #[inline]
9429    fn from(node: TupleField) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9430}
9431impl From<TypeAlias> for AnyHasDocComments {
9432    #[inline]
9433    fn from(node: TypeAlias) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9434}
9435impl From<Union> for AnyHasDocComments {
9436    #[inline]
9437    fn from(node: Union) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9438}
9439impl From<Use> for AnyHasDocComments {
9440    #[inline]
9441    fn from(node: Use) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9442}
9443impl From<Variant> for AnyHasDocComments {
9444    #[inline]
9445    fn from(node: Variant) -> AnyHasDocComments { AnyHasDocComments { syntax: node.syntax } }
9446}
9447impl ast::HasGenericArgs for AnyHasGenericArgs {}
9448impl AstNode for AnyHasGenericArgs {
9449    #[inline]
9450    fn can_cast(kind: SyntaxKind) -> bool {
9451        matches!(kind, ASSOC_TYPE_ARG | METHOD_CALL_EXPR | PATH_SEGMENT)
9452    }
9453    #[inline]
9454    fn cast(syntax: SyntaxNode) -> Option<Self> {
9455        Self::can_cast(syntax.kind()).then_some(AnyHasGenericArgs { syntax })
9456    }
9457    #[inline]
9458    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9459}
9460impl hash::Hash for AnyHasGenericArgs {
9461    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9462}
9463impl Eq for AnyHasGenericArgs {}
9464impl PartialEq for AnyHasGenericArgs {
9465    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9466}
9467impl Clone for AnyHasGenericArgs {
9468    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9469}
9470impl fmt::Debug for AnyHasGenericArgs {
9471    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9472        f.debug_struct("AnyHasGenericArgs").field("syntax", &self.syntax).finish()
9473    }
9474}
9475impl From<AssocTypeArg> for AnyHasGenericArgs {
9476    #[inline]
9477    fn from(node: AssocTypeArg) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
9478}
9479impl From<MethodCallExpr> for AnyHasGenericArgs {
9480    #[inline]
9481    fn from(node: MethodCallExpr) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
9482}
9483impl From<PathSegment> for AnyHasGenericArgs {
9484    #[inline]
9485    fn from(node: PathSegment) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
9486}
9487impl ast::HasGenericParams for AnyHasGenericParams {}
9488impl AstNode for AnyHasGenericParams {
9489    #[inline]
9490    fn can_cast(kind: SyntaxKind) -> bool {
9491        matches!(kind, CONST | ENUM | FN | IMPL | STRUCT | TRAIT | TRAIT_ALIAS | TYPE_ALIAS | UNION)
9492    }
9493    #[inline]
9494    fn cast(syntax: SyntaxNode) -> Option<Self> {
9495        Self::can_cast(syntax.kind()).then_some(AnyHasGenericParams { syntax })
9496    }
9497    #[inline]
9498    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9499}
9500impl hash::Hash for AnyHasGenericParams {
9501    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9502}
9503impl Eq for AnyHasGenericParams {}
9504impl PartialEq for AnyHasGenericParams {
9505    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9506}
9507impl Clone for AnyHasGenericParams {
9508    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9509}
9510impl fmt::Debug for AnyHasGenericParams {
9511    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9512        f.debug_struct("AnyHasGenericParams").field("syntax", &self.syntax).finish()
9513    }
9514}
9515impl From<Const> for AnyHasGenericParams {
9516    #[inline]
9517    fn from(node: Const) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9518}
9519impl From<Enum> for AnyHasGenericParams {
9520    #[inline]
9521    fn from(node: Enum) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9522}
9523impl From<Fn> for AnyHasGenericParams {
9524    #[inline]
9525    fn from(node: Fn) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9526}
9527impl From<Impl> for AnyHasGenericParams {
9528    #[inline]
9529    fn from(node: Impl) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9530}
9531impl From<Struct> for AnyHasGenericParams {
9532    #[inline]
9533    fn from(node: Struct) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9534}
9535impl From<Trait> for AnyHasGenericParams {
9536    #[inline]
9537    fn from(node: Trait) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9538}
9539impl From<TraitAlias> for AnyHasGenericParams {
9540    #[inline]
9541    fn from(node: TraitAlias) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9542}
9543impl From<TypeAlias> for AnyHasGenericParams {
9544    #[inline]
9545    fn from(node: TypeAlias) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9546}
9547impl From<Union> for AnyHasGenericParams {
9548    #[inline]
9549    fn from(node: Union) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9550}
9551impl ast::HasLoopBody for AnyHasLoopBody {}
9552impl AstNode for AnyHasLoopBody {
9553    #[inline]
9554    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, FOR_EXPR | LOOP_EXPR | WHILE_EXPR) }
9555    #[inline]
9556    fn cast(syntax: SyntaxNode) -> Option<Self> {
9557        Self::can_cast(syntax.kind()).then_some(AnyHasLoopBody { syntax })
9558    }
9559    #[inline]
9560    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9561}
9562impl hash::Hash for AnyHasLoopBody {
9563    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9564}
9565impl Eq for AnyHasLoopBody {}
9566impl PartialEq for AnyHasLoopBody {
9567    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9568}
9569impl Clone for AnyHasLoopBody {
9570    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9571}
9572impl fmt::Debug for AnyHasLoopBody {
9573    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9574        f.debug_struct("AnyHasLoopBody").field("syntax", &self.syntax).finish()
9575    }
9576}
9577impl From<ForExpr> for AnyHasLoopBody {
9578    #[inline]
9579    fn from(node: ForExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
9580}
9581impl From<LoopExpr> for AnyHasLoopBody {
9582    #[inline]
9583    fn from(node: LoopExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
9584}
9585impl From<WhileExpr> for AnyHasLoopBody {
9586    #[inline]
9587    fn from(node: WhileExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
9588}
9589impl ast::HasModuleItem for AnyHasModuleItem {}
9590impl AstNode for AnyHasModuleItem {
9591    #[inline]
9592    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ITEM_LIST | MACRO_ITEMS | SOURCE_FILE) }
9593    #[inline]
9594    fn cast(syntax: SyntaxNode) -> Option<Self> {
9595        Self::can_cast(syntax.kind()).then_some(AnyHasModuleItem { syntax })
9596    }
9597    #[inline]
9598    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9599}
9600impl hash::Hash for AnyHasModuleItem {
9601    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9602}
9603impl Eq for AnyHasModuleItem {}
9604impl PartialEq for AnyHasModuleItem {
9605    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9606}
9607impl Clone for AnyHasModuleItem {
9608    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9609}
9610impl fmt::Debug for AnyHasModuleItem {
9611    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9612        f.debug_struct("AnyHasModuleItem").field("syntax", &self.syntax).finish()
9613    }
9614}
9615impl From<ItemList> for AnyHasModuleItem {
9616    #[inline]
9617    fn from(node: ItemList) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9618}
9619impl From<MacroItems> for AnyHasModuleItem {
9620    #[inline]
9621    fn from(node: MacroItems) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9622}
9623impl From<SourceFile> for AnyHasModuleItem {
9624    #[inline]
9625    fn from(node: SourceFile) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9626}
9627impl ast::HasName for AnyHasName {}
9628impl AstNode for AnyHasName {
9629    #[inline]
9630    fn can_cast(kind: SyntaxKind) -> bool {
9631        matches!(
9632            kind,
9633            ASM_OPERAND_NAMED
9634                | CONST
9635                | CONST_PARAM
9636                | ENUM
9637                | FN
9638                | FORMAT_ARGS_ARG
9639                | IDENT_PAT
9640                | MACRO_DEF
9641                | MACRO_RULES
9642                | MODULE
9643                | RECORD_FIELD
9644                | RENAME
9645                | SELF_PARAM
9646                | STATIC
9647                | STRUCT
9648                | TRAIT
9649                | TRAIT_ALIAS
9650                | TYPE_ALIAS
9651                | TYPE_PARAM
9652                | UNION
9653                | VARIANT
9654        )
9655    }
9656    #[inline]
9657    fn cast(syntax: SyntaxNode) -> Option<Self> {
9658        Self::can_cast(syntax.kind()).then_some(AnyHasName { syntax })
9659    }
9660    #[inline]
9661    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9662}
9663impl hash::Hash for AnyHasName {
9664    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9665}
9666impl Eq for AnyHasName {}
9667impl PartialEq for AnyHasName {
9668    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9669}
9670impl Clone for AnyHasName {
9671    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9672}
9673impl fmt::Debug for AnyHasName {
9674    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9675        f.debug_struct("AnyHasName").field("syntax", &self.syntax).finish()
9676    }
9677}
9678impl From<AsmOperandNamed> for AnyHasName {
9679    #[inline]
9680    fn from(node: AsmOperandNamed) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9681}
9682impl From<Const> for AnyHasName {
9683    #[inline]
9684    fn from(node: Const) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9685}
9686impl From<ConstParam> for AnyHasName {
9687    #[inline]
9688    fn from(node: ConstParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9689}
9690impl From<Enum> for AnyHasName {
9691    #[inline]
9692    fn from(node: Enum) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9693}
9694impl From<Fn> for AnyHasName {
9695    #[inline]
9696    fn from(node: Fn) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9697}
9698impl From<FormatArgsArg> for AnyHasName {
9699    #[inline]
9700    fn from(node: FormatArgsArg) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9701}
9702impl From<IdentPat> for AnyHasName {
9703    #[inline]
9704    fn from(node: IdentPat) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9705}
9706impl From<MacroDef> for AnyHasName {
9707    #[inline]
9708    fn from(node: MacroDef) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9709}
9710impl From<MacroRules> for AnyHasName {
9711    #[inline]
9712    fn from(node: MacroRules) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9713}
9714impl From<Module> for AnyHasName {
9715    #[inline]
9716    fn from(node: Module) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9717}
9718impl From<RecordField> for AnyHasName {
9719    #[inline]
9720    fn from(node: RecordField) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9721}
9722impl From<Rename> for AnyHasName {
9723    #[inline]
9724    fn from(node: Rename) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9725}
9726impl From<SelfParam> for AnyHasName {
9727    #[inline]
9728    fn from(node: SelfParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9729}
9730impl From<Static> for AnyHasName {
9731    #[inline]
9732    fn from(node: Static) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9733}
9734impl From<Struct> for AnyHasName {
9735    #[inline]
9736    fn from(node: Struct) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9737}
9738impl From<Trait> for AnyHasName {
9739    #[inline]
9740    fn from(node: Trait) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9741}
9742impl From<TraitAlias> for AnyHasName {
9743    #[inline]
9744    fn from(node: TraitAlias) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9745}
9746impl From<TypeAlias> for AnyHasName {
9747    #[inline]
9748    fn from(node: TypeAlias) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9749}
9750impl From<TypeParam> for AnyHasName {
9751    #[inline]
9752    fn from(node: TypeParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9753}
9754impl From<Union> for AnyHasName {
9755    #[inline]
9756    fn from(node: Union) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9757}
9758impl From<Variant> for AnyHasName {
9759    #[inline]
9760    fn from(node: Variant) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9761}
9762impl ast::HasTypeBounds for AnyHasTypeBounds {}
9763impl AstNode for AnyHasTypeBounds {
9764    #[inline]
9765    fn can_cast(kind: SyntaxKind) -> bool {
9766        matches!(
9767            kind,
9768            ASSOC_TYPE_ARG | LIFETIME_PARAM | TRAIT | TYPE_ALIAS | TYPE_PARAM | WHERE_PRED
9769        )
9770    }
9771    #[inline]
9772    fn cast(syntax: SyntaxNode) -> Option<Self> {
9773        Self::can_cast(syntax.kind()).then_some(AnyHasTypeBounds { syntax })
9774    }
9775    #[inline]
9776    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9777}
9778impl hash::Hash for AnyHasTypeBounds {
9779    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9780}
9781impl Eq for AnyHasTypeBounds {}
9782impl PartialEq for AnyHasTypeBounds {
9783    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9784}
9785impl Clone for AnyHasTypeBounds {
9786    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9787}
9788impl fmt::Debug for AnyHasTypeBounds {
9789    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9790        f.debug_struct("AnyHasTypeBounds").field("syntax", &self.syntax).finish()
9791    }
9792}
9793impl From<AssocTypeArg> for AnyHasTypeBounds {
9794    #[inline]
9795    fn from(node: AssocTypeArg) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9796}
9797impl From<LifetimeParam> for AnyHasTypeBounds {
9798    #[inline]
9799    fn from(node: LifetimeParam) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9800}
9801impl From<Trait> for AnyHasTypeBounds {
9802    #[inline]
9803    fn from(node: Trait) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9804}
9805impl From<TypeAlias> for AnyHasTypeBounds {
9806    #[inline]
9807    fn from(node: TypeAlias) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9808}
9809impl From<TypeParam> for AnyHasTypeBounds {
9810    #[inline]
9811    fn from(node: TypeParam) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9812}
9813impl From<WherePred> for AnyHasTypeBounds {
9814    #[inline]
9815    fn from(node: WherePred) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9816}
9817impl ast::HasVisibility for AnyHasVisibility {}
9818impl AstNode for AnyHasVisibility {
9819    #[inline]
9820    fn can_cast(kind: SyntaxKind) -> bool {
9821        matches!(
9822            kind,
9823            CONST
9824                | ENUM
9825                | EXTERN_CRATE
9826                | FN
9827                | IMPL
9828                | MACRO_DEF
9829                | MACRO_RULES
9830                | MODULE
9831                | RECORD_FIELD
9832                | STATIC
9833                | STRUCT
9834                | TRAIT
9835                | TRAIT_ALIAS
9836                | TUPLE_FIELD
9837                | TYPE_ALIAS
9838                | UNION
9839                | USE
9840                | VARIANT
9841        )
9842    }
9843    #[inline]
9844    fn cast(syntax: SyntaxNode) -> Option<Self> {
9845        Self::can_cast(syntax.kind()).then_some(AnyHasVisibility { syntax })
9846    }
9847    #[inline]
9848    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9849}
9850impl hash::Hash for AnyHasVisibility {
9851    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9852}
9853impl Eq for AnyHasVisibility {}
9854impl PartialEq for AnyHasVisibility {
9855    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9856}
9857impl Clone for AnyHasVisibility {
9858    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9859}
9860impl fmt::Debug for AnyHasVisibility {
9861    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9862        f.debug_struct("AnyHasVisibility").field("syntax", &self.syntax).finish()
9863    }
9864}
9865impl From<Const> for AnyHasVisibility {
9866    #[inline]
9867    fn from(node: Const) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9868}
9869impl From<Enum> for AnyHasVisibility {
9870    #[inline]
9871    fn from(node: Enum) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9872}
9873impl From<ExternCrate> for AnyHasVisibility {
9874    #[inline]
9875    fn from(node: ExternCrate) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9876}
9877impl From<Fn> for AnyHasVisibility {
9878    #[inline]
9879    fn from(node: Fn) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9880}
9881impl From<Impl> for AnyHasVisibility {
9882    #[inline]
9883    fn from(node: Impl) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9884}
9885impl From<MacroDef> for AnyHasVisibility {
9886    #[inline]
9887    fn from(node: MacroDef) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9888}
9889impl From<MacroRules> for AnyHasVisibility {
9890    #[inline]
9891    fn from(node: MacroRules) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9892}
9893impl From<Module> for AnyHasVisibility {
9894    #[inline]
9895    fn from(node: Module) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9896}
9897impl From<RecordField> for AnyHasVisibility {
9898    #[inline]
9899    fn from(node: RecordField) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9900}
9901impl From<Static> for AnyHasVisibility {
9902    #[inline]
9903    fn from(node: Static) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9904}
9905impl From<Struct> for AnyHasVisibility {
9906    #[inline]
9907    fn from(node: Struct) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9908}
9909impl From<Trait> for AnyHasVisibility {
9910    #[inline]
9911    fn from(node: Trait) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9912}
9913impl From<TraitAlias> for AnyHasVisibility {
9914    #[inline]
9915    fn from(node: TraitAlias) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9916}
9917impl From<TupleField> for AnyHasVisibility {
9918    #[inline]
9919    fn from(node: TupleField) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9920}
9921impl From<TypeAlias> for AnyHasVisibility {
9922    #[inline]
9923    fn from(node: TypeAlias) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9924}
9925impl From<Union> for AnyHasVisibility {
9926    #[inline]
9927    fn from(node: Union) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9928}
9929impl From<Use> for AnyHasVisibility {
9930    #[inline]
9931    fn from(node: Use) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9932}
9933impl From<Variant> for AnyHasVisibility {
9934    #[inline]
9935    fn from(node: Variant) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9936}
9937impl std::fmt::Display for Adt {
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 AsmOperand {
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 AsmPiece {
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 AssocItem {
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 Expr {
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 ExternItem {
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 FieldList {
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 GenericArg {
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 GenericParam {
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 Item {
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 Pat {
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 Stmt {
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 Type {
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 UseBoundGenericArg {
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 VariantDef {
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 Abi {
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 ArgList {
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 ArrayExpr {
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 ArrayType {
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 AsmClobberAbi {
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 AsmConst {
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 AsmDirSpec {
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 AsmExpr {
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 AsmLabel {
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 AsmOperandExpr {
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 AsmOperandNamed {
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 AsmOption {
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 AsmOptions {
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 AsmRegOperand {
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 AsmRegSpec {
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 AsmSym {
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 AssocItemList {
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 AssocTypeArg {
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 Attr {
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 AwaitExpr {
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 BecomeExpr {
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 BinExpr {
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 BlockExpr {
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 BoxPat {
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 BreakExpr {
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 CallExpr {
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 CastExpr {
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 ClosureExpr {
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 Const {
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 ConstArg {
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 ConstBlockPat {
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 ConstParam {
10168    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10169        std::fmt::Display::fmt(self.syntax(), f)
10170    }
10171}
10172impl std::fmt::Display for ContinueExpr {
10173    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10174        std::fmt::Display::fmt(self.syntax(), f)
10175    }
10176}
10177impl std::fmt::Display for DynTraitType {
10178    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10179        std::fmt::Display::fmt(self.syntax(), f)
10180    }
10181}
10182impl std::fmt::Display for Enum {
10183    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10184        std::fmt::Display::fmt(self.syntax(), f)
10185    }
10186}
10187impl std::fmt::Display for ExprStmt {
10188    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10189        std::fmt::Display::fmt(self.syntax(), f)
10190    }
10191}
10192impl std::fmt::Display for ExternBlock {
10193    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10194        std::fmt::Display::fmt(self.syntax(), f)
10195    }
10196}
10197impl std::fmt::Display for ExternCrate {
10198    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10199        std::fmt::Display::fmt(self.syntax(), f)
10200    }
10201}
10202impl std::fmt::Display for ExternItemList {
10203    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10204        std::fmt::Display::fmt(self.syntax(), f)
10205    }
10206}
10207impl std::fmt::Display for FieldExpr {
10208    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10209        std::fmt::Display::fmt(self.syntax(), f)
10210    }
10211}
10212impl std::fmt::Display for Fn {
10213    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10214        std::fmt::Display::fmt(self.syntax(), f)
10215    }
10216}
10217impl std::fmt::Display for FnPtrType {
10218    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10219        std::fmt::Display::fmt(self.syntax(), f)
10220    }
10221}
10222impl std::fmt::Display for ForBinder {
10223    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10224        std::fmt::Display::fmt(self.syntax(), f)
10225    }
10226}
10227impl std::fmt::Display for ForExpr {
10228    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10229        std::fmt::Display::fmt(self.syntax(), f)
10230    }
10231}
10232impl std::fmt::Display for ForType {
10233    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10234        std::fmt::Display::fmt(self.syntax(), f)
10235    }
10236}
10237impl std::fmt::Display for FormatArgsArg {
10238    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10239        std::fmt::Display::fmt(self.syntax(), f)
10240    }
10241}
10242impl std::fmt::Display for FormatArgsExpr {
10243    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10244        std::fmt::Display::fmt(self.syntax(), f)
10245    }
10246}
10247impl std::fmt::Display for GenericArgList {
10248    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10249        std::fmt::Display::fmt(self.syntax(), f)
10250    }
10251}
10252impl std::fmt::Display for GenericParamList {
10253    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10254        std::fmt::Display::fmt(self.syntax(), f)
10255    }
10256}
10257impl std::fmt::Display for IdentPat {
10258    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10259        std::fmt::Display::fmt(self.syntax(), f)
10260    }
10261}
10262impl std::fmt::Display for IfExpr {
10263    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10264        std::fmt::Display::fmt(self.syntax(), f)
10265    }
10266}
10267impl std::fmt::Display for Impl {
10268    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10269        std::fmt::Display::fmt(self.syntax(), f)
10270    }
10271}
10272impl std::fmt::Display for ImplTraitType {
10273    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10274        std::fmt::Display::fmt(self.syntax(), f)
10275    }
10276}
10277impl std::fmt::Display for IndexExpr {
10278    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10279        std::fmt::Display::fmt(self.syntax(), f)
10280    }
10281}
10282impl std::fmt::Display for InferType {
10283    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10284        std::fmt::Display::fmt(self.syntax(), f)
10285    }
10286}
10287impl std::fmt::Display for ItemList {
10288    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10289        std::fmt::Display::fmt(self.syntax(), f)
10290    }
10291}
10292impl std::fmt::Display for Label {
10293    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10294        std::fmt::Display::fmt(self.syntax(), f)
10295    }
10296}
10297impl std::fmt::Display for LetElse {
10298    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10299        std::fmt::Display::fmt(self.syntax(), f)
10300    }
10301}
10302impl std::fmt::Display for LetExpr {
10303    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10304        std::fmt::Display::fmt(self.syntax(), f)
10305    }
10306}
10307impl std::fmt::Display for LetStmt {
10308    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10309        std::fmt::Display::fmt(self.syntax(), f)
10310    }
10311}
10312impl std::fmt::Display for Lifetime {
10313    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10314        std::fmt::Display::fmt(self.syntax(), f)
10315    }
10316}
10317impl std::fmt::Display for LifetimeArg {
10318    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10319        std::fmt::Display::fmt(self.syntax(), f)
10320    }
10321}
10322impl std::fmt::Display for LifetimeParam {
10323    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10324        std::fmt::Display::fmt(self.syntax(), f)
10325    }
10326}
10327impl std::fmt::Display for Literal {
10328    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10329        std::fmt::Display::fmt(self.syntax(), f)
10330    }
10331}
10332impl std::fmt::Display for LiteralPat {
10333    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10334        std::fmt::Display::fmt(self.syntax(), f)
10335    }
10336}
10337impl std::fmt::Display for LoopExpr {
10338    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10339        std::fmt::Display::fmt(self.syntax(), f)
10340    }
10341}
10342impl std::fmt::Display for MacroCall {
10343    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10344        std::fmt::Display::fmt(self.syntax(), f)
10345    }
10346}
10347impl std::fmt::Display for MacroDef {
10348    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10349        std::fmt::Display::fmt(self.syntax(), f)
10350    }
10351}
10352impl std::fmt::Display for MacroExpr {
10353    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10354        std::fmt::Display::fmt(self.syntax(), f)
10355    }
10356}
10357impl std::fmt::Display for MacroItems {
10358    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10359        std::fmt::Display::fmt(self.syntax(), f)
10360    }
10361}
10362impl std::fmt::Display for MacroPat {
10363    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10364        std::fmt::Display::fmt(self.syntax(), f)
10365    }
10366}
10367impl std::fmt::Display for MacroRules {
10368    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10369        std::fmt::Display::fmt(self.syntax(), f)
10370    }
10371}
10372impl std::fmt::Display for MacroStmts {
10373    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10374        std::fmt::Display::fmt(self.syntax(), f)
10375    }
10376}
10377impl std::fmt::Display for MacroType {
10378    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10379        std::fmt::Display::fmt(self.syntax(), f)
10380    }
10381}
10382impl std::fmt::Display for MatchArm {
10383    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10384        std::fmt::Display::fmt(self.syntax(), f)
10385    }
10386}
10387impl std::fmt::Display for MatchArmList {
10388    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10389        std::fmt::Display::fmt(self.syntax(), f)
10390    }
10391}
10392impl std::fmt::Display for MatchExpr {
10393    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10394        std::fmt::Display::fmt(self.syntax(), f)
10395    }
10396}
10397impl std::fmt::Display for MatchGuard {
10398    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10399        std::fmt::Display::fmt(self.syntax(), f)
10400    }
10401}
10402impl std::fmt::Display for Meta {
10403    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10404        std::fmt::Display::fmt(self.syntax(), f)
10405    }
10406}
10407impl std::fmt::Display for MethodCallExpr {
10408    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10409        std::fmt::Display::fmt(self.syntax(), f)
10410    }
10411}
10412impl std::fmt::Display for Module {
10413    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10414        std::fmt::Display::fmt(self.syntax(), f)
10415    }
10416}
10417impl std::fmt::Display for Name {
10418    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10419        std::fmt::Display::fmt(self.syntax(), f)
10420    }
10421}
10422impl std::fmt::Display for NameRef {
10423    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10424        std::fmt::Display::fmt(self.syntax(), f)
10425    }
10426}
10427impl std::fmt::Display for NeverType {
10428    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10429        std::fmt::Display::fmt(self.syntax(), f)
10430    }
10431}
10432impl std::fmt::Display for OffsetOfExpr {
10433    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10434        std::fmt::Display::fmt(self.syntax(), f)
10435    }
10436}
10437impl std::fmt::Display for OrPat {
10438    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10439        std::fmt::Display::fmt(self.syntax(), f)
10440    }
10441}
10442impl std::fmt::Display for Param {
10443    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10444        std::fmt::Display::fmt(self.syntax(), f)
10445    }
10446}
10447impl std::fmt::Display for ParamList {
10448    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10449        std::fmt::Display::fmt(self.syntax(), f)
10450    }
10451}
10452impl std::fmt::Display for ParenExpr {
10453    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10454        std::fmt::Display::fmt(self.syntax(), f)
10455    }
10456}
10457impl std::fmt::Display for ParenPat {
10458    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10459        std::fmt::Display::fmt(self.syntax(), f)
10460    }
10461}
10462impl std::fmt::Display for ParenType {
10463    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10464        std::fmt::Display::fmt(self.syntax(), f)
10465    }
10466}
10467impl std::fmt::Display for ParenthesizedArgList {
10468    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10469        std::fmt::Display::fmt(self.syntax(), f)
10470    }
10471}
10472impl std::fmt::Display for Path {
10473    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10474        std::fmt::Display::fmt(self.syntax(), f)
10475    }
10476}
10477impl std::fmt::Display for PathExpr {
10478    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10479        std::fmt::Display::fmt(self.syntax(), f)
10480    }
10481}
10482impl std::fmt::Display for PathPat {
10483    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10484        std::fmt::Display::fmt(self.syntax(), f)
10485    }
10486}
10487impl std::fmt::Display for PathSegment {
10488    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10489        std::fmt::Display::fmt(self.syntax(), f)
10490    }
10491}
10492impl std::fmt::Display for PathType {
10493    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10494        std::fmt::Display::fmt(self.syntax(), f)
10495    }
10496}
10497impl std::fmt::Display for PrefixExpr {
10498    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10499        std::fmt::Display::fmt(self.syntax(), f)
10500    }
10501}
10502impl std::fmt::Display for PtrType {
10503    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10504        std::fmt::Display::fmt(self.syntax(), f)
10505    }
10506}
10507impl std::fmt::Display for RangeExpr {
10508    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10509        std::fmt::Display::fmt(self.syntax(), f)
10510    }
10511}
10512impl std::fmt::Display for RangePat {
10513    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10514        std::fmt::Display::fmt(self.syntax(), f)
10515    }
10516}
10517impl std::fmt::Display for RecordExpr {
10518    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10519        std::fmt::Display::fmt(self.syntax(), f)
10520    }
10521}
10522impl std::fmt::Display for RecordExprField {
10523    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10524        std::fmt::Display::fmt(self.syntax(), f)
10525    }
10526}
10527impl std::fmt::Display for RecordExprFieldList {
10528    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10529        std::fmt::Display::fmt(self.syntax(), f)
10530    }
10531}
10532impl std::fmt::Display for RecordField {
10533    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10534        std::fmt::Display::fmt(self.syntax(), f)
10535    }
10536}
10537impl std::fmt::Display for RecordFieldList {
10538    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10539        std::fmt::Display::fmt(self.syntax(), f)
10540    }
10541}
10542impl std::fmt::Display for RecordPat {
10543    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10544        std::fmt::Display::fmt(self.syntax(), f)
10545    }
10546}
10547impl std::fmt::Display for RecordPatField {
10548    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10549        std::fmt::Display::fmt(self.syntax(), f)
10550    }
10551}
10552impl std::fmt::Display for RecordPatFieldList {
10553    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10554        std::fmt::Display::fmt(self.syntax(), f)
10555    }
10556}
10557impl std::fmt::Display for RefExpr {
10558    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10559        std::fmt::Display::fmt(self.syntax(), f)
10560    }
10561}
10562impl std::fmt::Display for RefPat {
10563    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10564        std::fmt::Display::fmt(self.syntax(), f)
10565    }
10566}
10567impl std::fmt::Display for RefType {
10568    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10569        std::fmt::Display::fmt(self.syntax(), f)
10570    }
10571}
10572impl std::fmt::Display for Rename {
10573    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10574        std::fmt::Display::fmt(self.syntax(), f)
10575    }
10576}
10577impl std::fmt::Display for RestPat {
10578    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10579        std::fmt::Display::fmt(self.syntax(), f)
10580    }
10581}
10582impl std::fmt::Display for RetType {
10583    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10584        std::fmt::Display::fmt(self.syntax(), f)
10585    }
10586}
10587impl std::fmt::Display for ReturnExpr {
10588    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10589        std::fmt::Display::fmt(self.syntax(), f)
10590    }
10591}
10592impl std::fmt::Display for ReturnTypeSyntax {
10593    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10594        std::fmt::Display::fmt(self.syntax(), f)
10595    }
10596}
10597impl std::fmt::Display for SelfParam {
10598    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10599        std::fmt::Display::fmt(self.syntax(), f)
10600    }
10601}
10602impl std::fmt::Display for SlicePat {
10603    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10604        std::fmt::Display::fmt(self.syntax(), f)
10605    }
10606}
10607impl std::fmt::Display for SliceType {
10608    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10609        std::fmt::Display::fmt(self.syntax(), f)
10610    }
10611}
10612impl std::fmt::Display for SourceFile {
10613    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10614        std::fmt::Display::fmt(self.syntax(), f)
10615    }
10616}
10617impl std::fmt::Display for Static {
10618    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10619        std::fmt::Display::fmt(self.syntax(), f)
10620    }
10621}
10622impl std::fmt::Display for StmtList {
10623    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10624        std::fmt::Display::fmt(self.syntax(), f)
10625    }
10626}
10627impl std::fmt::Display for Struct {
10628    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10629        std::fmt::Display::fmt(self.syntax(), f)
10630    }
10631}
10632impl std::fmt::Display for TokenTree {
10633    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10634        std::fmt::Display::fmt(self.syntax(), f)
10635    }
10636}
10637impl std::fmt::Display for Trait {
10638    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10639        std::fmt::Display::fmt(self.syntax(), f)
10640    }
10641}
10642impl std::fmt::Display for TraitAlias {
10643    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10644        std::fmt::Display::fmt(self.syntax(), f)
10645    }
10646}
10647impl std::fmt::Display for TryExpr {
10648    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10649        std::fmt::Display::fmt(self.syntax(), f)
10650    }
10651}
10652impl std::fmt::Display for TupleExpr {
10653    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10654        std::fmt::Display::fmt(self.syntax(), f)
10655    }
10656}
10657impl std::fmt::Display for TupleField {
10658    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10659        std::fmt::Display::fmt(self.syntax(), f)
10660    }
10661}
10662impl std::fmt::Display for TupleFieldList {
10663    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10664        std::fmt::Display::fmt(self.syntax(), f)
10665    }
10666}
10667impl std::fmt::Display for TuplePat {
10668    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10669        std::fmt::Display::fmt(self.syntax(), f)
10670    }
10671}
10672impl std::fmt::Display for TupleStructPat {
10673    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10674        std::fmt::Display::fmt(self.syntax(), f)
10675    }
10676}
10677impl std::fmt::Display for TupleType {
10678    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10679        std::fmt::Display::fmt(self.syntax(), f)
10680    }
10681}
10682impl std::fmt::Display for TypeAlias {
10683    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10684        std::fmt::Display::fmt(self.syntax(), f)
10685    }
10686}
10687impl std::fmt::Display for TypeAnchor {
10688    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10689        std::fmt::Display::fmt(self.syntax(), f)
10690    }
10691}
10692impl std::fmt::Display for TypeArg {
10693    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10694        std::fmt::Display::fmt(self.syntax(), f)
10695    }
10696}
10697impl std::fmt::Display for TypeBound {
10698    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10699        std::fmt::Display::fmt(self.syntax(), f)
10700    }
10701}
10702impl std::fmt::Display for TypeBoundList {
10703    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10704        std::fmt::Display::fmt(self.syntax(), f)
10705    }
10706}
10707impl std::fmt::Display for TypeParam {
10708    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10709        std::fmt::Display::fmt(self.syntax(), f)
10710    }
10711}
10712impl std::fmt::Display for UnderscoreExpr {
10713    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10714        std::fmt::Display::fmt(self.syntax(), f)
10715    }
10716}
10717impl std::fmt::Display for Union {
10718    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10719        std::fmt::Display::fmt(self.syntax(), f)
10720    }
10721}
10722impl std::fmt::Display for Use {
10723    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10724        std::fmt::Display::fmt(self.syntax(), f)
10725    }
10726}
10727impl std::fmt::Display for UseBoundGenericArgs {
10728    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10729        std::fmt::Display::fmt(self.syntax(), f)
10730    }
10731}
10732impl std::fmt::Display for UseTree {
10733    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10734        std::fmt::Display::fmt(self.syntax(), f)
10735    }
10736}
10737impl std::fmt::Display for UseTreeList {
10738    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10739        std::fmt::Display::fmt(self.syntax(), f)
10740    }
10741}
10742impl std::fmt::Display for Variant {
10743    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10744        std::fmt::Display::fmt(self.syntax(), f)
10745    }
10746}
10747impl std::fmt::Display for VariantList {
10748    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10749        std::fmt::Display::fmt(self.syntax(), f)
10750    }
10751}
10752impl std::fmt::Display for Visibility {
10753    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10754        std::fmt::Display::fmt(self.syntax(), f)
10755    }
10756}
10757impl std::fmt::Display for WhereClause {
10758    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10759        std::fmt::Display::fmt(self.syntax(), f)
10760    }
10761}
10762impl std::fmt::Display for WherePred {
10763    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10764        std::fmt::Display::fmt(self.syntax(), f)
10765    }
10766}
10767impl std::fmt::Display for WhileExpr {
10768    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10769        std::fmt::Display::fmt(self.syntax(), f)
10770    }
10771}
10772impl std::fmt::Display for WildcardPat {
10773    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10774        std::fmt::Display::fmt(self.syntax(), f)
10775    }
10776}
10777impl std::fmt::Display for YeetExpr {
10778    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10779        std::fmt::Display::fmt(self.syntax(), f)
10780    }
10781}
10782impl std::fmt::Display for YieldExpr {
10783    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10784        std::fmt::Display::fmt(self.syntax(), f)
10785    }
10786}