Skip to main content

syntax/ast/generated/
nodes.rs

1//! Generated by `cargo xtask codegen grammar`, do not edit by hand.
2
3#![allow(non_snake_case)]
4use crate::{
5    SyntaxKind::{self, *},
6    SyntaxNode, SyntaxToken, T,
7    ast::{self, AstChildren, AstNode, support},
8};
9use std::{fmt, hash};
10pub struct Abi {
11    pub(crate) syntax: SyntaxNode,
12}
13impl Abi {
14    #[inline]
15    pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
16    #[inline]
17    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
18}
19pub struct ArgList {
20    pub(crate) syntax: SyntaxNode,
21}
22impl ArgList {
23    #[inline]
24    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
25    #[inline]
26    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
27}
28pub struct ArrayExpr {
29    pub(crate) syntax: SyntaxNode,
30}
31impl ast::HasAttrs for ArrayExpr {}
32impl ArrayExpr {
33    #[inline]
34    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
35    #[inline]
36    pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
37    #[inline]
38    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
39    #[inline]
40    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
41    #[inline]
42    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
43}
44pub struct ArrayType {
45    pub(crate) syntax: SyntaxNode,
46}
47impl ArrayType {
48    #[inline]
49    pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
50    #[inline]
51    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
52    #[inline]
53    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
54    #[inline]
55    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
56    #[inline]
57    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
58}
59pub struct AsmClobberAbi {
60    pub(crate) syntax: SyntaxNode,
61}
62impl ast::HasAttrs for AsmClobberAbi {}
63impl AsmClobberAbi {
64    #[inline]
65    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
66    #[inline]
67    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
68    #[inline]
69    pub fn clobber_abi_token(&self) -> Option<SyntaxToken> {
70        support::token(&self.syntax, T![clobber_abi])
71    }
72    #[inline]
73    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
74}
75pub struct AsmConst {
76    pub(crate) syntax: SyntaxNode,
77}
78impl AsmConst {
79    #[inline]
80    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
81    #[inline]
82    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
83}
84pub struct AsmDirSpec {
85    pub(crate) syntax: SyntaxNode,
86}
87impl AsmDirSpec {
88    #[inline]
89    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
90    #[inline]
91    pub fn inlateout_token(&self) -> Option<SyntaxToken> {
92        support::token(&self.syntax, T![inlateout])
93    }
94    #[inline]
95    pub fn inout_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![inout]) }
96    #[inline]
97    pub fn lateout_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![lateout]) }
98    #[inline]
99    pub fn out_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![out]) }
100}
101pub struct AsmExpr {
102    pub(crate) syntax: SyntaxNode,
103}
104impl ast::HasAttrs for AsmExpr {}
105impl AsmExpr {
106    #[inline]
107    pub fn asm_pieces(&self) -> AstChildren<AsmPiece> { support::children(&self.syntax) }
108    #[inline]
109    pub fn template(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
110    #[inline]
111    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
112    #[inline]
113    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
114    #[inline]
115    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
116    #[inline]
117    pub fn asm_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![asm]) }
118    #[inline]
119    pub fn global_asm_token(&self) -> Option<SyntaxToken> {
120        support::token(&self.syntax, T![global_asm])
121    }
122    #[inline]
123    pub fn naked_asm_token(&self) -> Option<SyntaxToken> {
124        support::token(&self.syntax, T![naked_asm])
125    }
126}
127pub struct AsmLabel {
128    pub(crate) syntax: SyntaxNode,
129}
130impl AsmLabel {
131    #[inline]
132    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
133    #[inline]
134    pub fn label_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![label]) }
135}
136pub struct AsmOperandExpr {
137    pub(crate) syntax: SyntaxNode,
138}
139impl AsmOperandExpr {
140    #[inline]
141    pub fn in_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
142    #[inline]
143    pub fn out_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
144    #[inline]
145    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
146}
147pub struct AsmOperandNamed {
148    pub(crate) syntax: SyntaxNode,
149}
150impl ast::HasAttrs for AsmOperandNamed {}
151impl ast::HasName for AsmOperandNamed {}
152impl AsmOperandNamed {
153    #[inline]
154    pub fn asm_operand(&self) -> Option<AsmOperand> { support::child(&self.syntax) }
155    #[inline]
156    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
157}
158pub struct AsmOption {
159    pub(crate) syntax: SyntaxNode,
160}
161impl AsmOption {
162    #[inline]
163    pub fn att_syntax_token(&self) -> Option<SyntaxToken> {
164        support::token(&self.syntax, T![att_syntax])
165    }
166    #[inline]
167    pub fn may_unwind_token(&self) -> Option<SyntaxToken> {
168        support::token(&self.syntax, T![may_unwind])
169    }
170    #[inline]
171    pub fn nomem_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![nomem]) }
172    #[inline]
173    pub fn noreturn_token(&self) -> Option<SyntaxToken> {
174        support::token(&self.syntax, T![noreturn])
175    }
176    #[inline]
177    pub fn nostack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![nostack]) }
178    #[inline]
179    pub fn preserves_flags_token(&self) -> Option<SyntaxToken> {
180        support::token(&self.syntax, T![preserves_flags])
181    }
182    #[inline]
183    pub fn pure_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![pure]) }
184    #[inline]
185    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
186    #[inline]
187    pub fn readonly_token(&self) -> Option<SyntaxToken> {
188        support::token(&self.syntax, T![readonly])
189    }
190}
191pub struct AsmOptions {
192    pub(crate) syntax: SyntaxNode,
193}
194impl ast::HasAttrs for AsmOptions {}
195impl AsmOptions {
196    #[inline]
197    pub fn asm_options(&self) -> AstChildren<AsmOption> { support::children(&self.syntax) }
198    #[inline]
199    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
200    #[inline]
201    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
202    #[inline]
203    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
204    #[inline]
205    pub fn options_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![options]) }
206}
207pub struct AsmRegOperand {
208    pub(crate) syntax: SyntaxNode,
209}
210impl AsmRegOperand {
211    #[inline]
212    pub fn asm_dir_spec(&self) -> Option<AsmDirSpec> { support::child(&self.syntax) }
213    #[inline]
214    pub fn asm_operand_expr(&self) -> Option<AsmOperandExpr> { support::child(&self.syntax) }
215    #[inline]
216    pub fn asm_reg_spec(&self) -> Option<AsmRegSpec> { support::child(&self.syntax) }
217    #[inline]
218    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
219    #[inline]
220    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
221}
222pub struct AsmRegSpec {
223    pub(crate) syntax: SyntaxNode,
224}
225impl AsmRegSpec {
226    #[inline]
227    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
228    #[inline]
229    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
230}
231pub struct AsmSym {
232    pub(crate) syntax: SyntaxNode,
233}
234impl AsmSym {
235    #[inline]
236    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
237    #[inline]
238    pub fn sym_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![sym]) }
239}
240pub struct AssocItemList {
241    pub(crate) syntax: SyntaxNode,
242}
243impl ast::HasAttrs for AssocItemList {}
244impl AssocItemList {
245    #[inline]
246    pub fn assoc_items(&self) -> AstChildren<AssocItem> { support::children(&self.syntax) }
247    #[inline]
248    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
249    #[inline]
250    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
251}
252pub struct AssocTypeArg {
253    pub(crate) syntax: SyntaxNode,
254}
255impl ast::HasGenericArgs for AssocTypeArg {}
256impl ast::HasTypeBounds for AssocTypeArg {}
257impl AssocTypeArg {
258    #[inline]
259    pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
260    #[inline]
261    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
262    #[inline]
263    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
264    #[inline]
265    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
266    #[inline]
267    pub fn return_type_syntax(&self) -> Option<ReturnTypeSyntax> { support::child(&self.syntax) }
268    #[inline]
269    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
270    #[inline]
271    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
272}
273pub struct Attr {
274    pub(crate) syntax: SyntaxNode,
275}
276impl Attr {
277    #[inline]
278    pub fn meta(&self) -> Option<Meta> { support::child(&self.syntax) }
279    #[inline]
280    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
281    #[inline]
282    pub fn pound_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![#]) }
283    #[inline]
284    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
285    #[inline]
286    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
287}
288pub struct AwaitExpr {
289    pub(crate) syntax: SyntaxNode,
290}
291impl ast::HasAttrs for AwaitExpr {}
292impl AwaitExpr {
293    #[inline]
294    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
295    #[inline]
296    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
297    #[inline]
298    pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) }
299}
300pub struct BecomeExpr {
301    pub(crate) syntax: SyntaxNode,
302}
303impl ast::HasAttrs for BecomeExpr {}
304impl BecomeExpr {
305    #[inline]
306    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
307    #[inline]
308    pub fn become_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![become]) }
309}
310pub struct BinExpr {
311    pub(crate) syntax: SyntaxNode,
312}
313impl ast::HasAttrs for BinExpr {}
314impl BinExpr {}
315pub struct BlockExpr {
316    pub(crate) syntax: SyntaxNode,
317}
318impl ast::HasAttrs for BlockExpr {}
319impl BlockExpr {
320    #[inline]
321    pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
322    #[inline]
323    pub fn stmt_list(&self) -> Option<StmtList> { support::child(&self.syntax) }
324    #[inline]
325    pub fn try_block_modifier(&self) -> Option<TryBlockModifier> { support::child(&self.syntax) }
326    #[inline]
327    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
328    #[inline]
329    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
330    #[inline]
331    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
332    #[inline]
333    pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
334    #[inline]
335    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
336}
337pub struct BoxPat {
338    pub(crate) syntax: SyntaxNode,
339}
340impl BoxPat {
341    #[inline]
342    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
343    #[inline]
344    pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
345}
346pub struct BreakExpr {
347    pub(crate) syntax: SyntaxNode,
348}
349impl ast::HasAttrs for BreakExpr {}
350impl BreakExpr {
351    #[inline]
352    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
353    #[inline]
354    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
355    #[inline]
356    pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) }
357}
358pub struct CallExpr {
359    pub(crate) syntax: SyntaxNode,
360}
361impl ast::HasArgList for CallExpr {}
362impl ast::HasAttrs for CallExpr {}
363impl CallExpr {
364    #[inline]
365    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
366}
367pub struct CastExpr {
368    pub(crate) syntax: SyntaxNode,
369}
370impl ast::HasAttrs for CastExpr {}
371impl CastExpr {
372    #[inline]
373    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
374    #[inline]
375    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
376    #[inline]
377    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
378}
379pub struct CfgAtom {
380    pub(crate) syntax: SyntaxNode,
381}
382impl CfgAtom {
383    #[inline]
384    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
385    #[inline]
386    pub fn false_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![false]) }
387    #[inline]
388    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
389    #[inline]
390    pub fn string_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![string]) }
391    #[inline]
392    pub fn true_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![true]) }
393}
394pub struct CfgAttrMeta {
395    pub(crate) syntax: SyntaxNode,
396}
397impl CfgAttrMeta {
398    #[inline]
399    pub fn cfg_predicate(&self) -> Option<CfgPredicate> { support::child(&self.syntax) }
400    #[inline]
401    pub fn metas(&self) -> AstChildren<Meta> { support::children(&self.syntax) }
402    #[inline]
403    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
404    #[inline]
405    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
406    #[inline]
407    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
408    #[inline]
409    pub fn cfg_attr_token(&self) -> Option<SyntaxToken> {
410        support::token(&self.syntax, T![cfg_attr])
411    }
412}
413pub struct CfgComposite {
414    pub(crate) syntax: SyntaxNode,
415}
416impl CfgComposite {
417    #[inline]
418    pub fn cfg_predicates(&self) -> AstChildren<CfgPredicate> { support::children(&self.syntax) }
419    #[inline]
420    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
421    #[inline]
422    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
423    #[inline]
424    pub fn keyword(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
425}
426pub struct CfgMeta {
427    pub(crate) syntax: SyntaxNode,
428}
429impl CfgMeta {
430    #[inline]
431    pub fn cfg_predicate(&self) -> Option<CfgPredicate> { support::child(&self.syntax) }
432    #[inline]
433    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
434    #[inline]
435    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
436    #[inline]
437    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
438    #[inline]
439    pub fn cfg_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![cfg]) }
440}
441pub struct CfgPredExpr {
442    pub(crate) syntax: SyntaxNode,
443}
444impl CfgPredExpr {
445    #[inline]
446    pub fn cfg_predicate(&self) -> Option<CfgPredicate> { support::child(&self.syntax) }
447    #[inline]
448    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
449    #[inline]
450    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
451    #[inline]
452    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
453    #[inline]
454    pub fn cfg_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![cfg]) }
455}
456pub struct CfgPredPat {
457    pub(crate) syntax: SyntaxNode,
458}
459impl CfgPredPat {
460    #[inline]
461    pub fn cfg_predicate(&self) -> Option<CfgPredicate> { support::child(&self.syntax) }
462    #[inline]
463    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
464    #[inline]
465    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
466    #[inline]
467    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
468    #[inline]
469    pub fn cfg_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![cfg]) }
470}
471pub struct ClosureExpr {
472    pub(crate) syntax: SyntaxNode,
473}
474impl ast::HasAttrs for ClosureExpr {}
475impl ClosureExpr {
476    #[inline]
477    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
478    #[inline]
479    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
480    #[inline]
481    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
482    #[inline]
483    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
484    #[inline]
485    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
486    #[inline]
487    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
488    #[inline]
489    pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
490    #[inline]
491    pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
492}
493pub struct Const {
494    pub(crate) syntax: SyntaxNode,
495}
496impl ast::HasAttrs for Const {}
497impl ast::HasGenericParams for Const {}
498impl ast::HasName for Const {}
499impl ast::HasVisibility for Const {}
500impl Const {
501    #[inline]
502    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
503    #[inline]
504    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
505    #[inline]
506    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
507    #[inline]
508    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
509    #[inline]
510    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
511    #[inline]
512    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
513    #[inline]
514    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
515    #[inline]
516    pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
517}
518pub struct ConstArg {
519    pub(crate) syntax: SyntaxNode,
520}
521impl ConstArg {
522    #[inline]
523    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
524}
525pub struct ConstBlockPat {
526    pub(crate) syntax: SyntaxNode,
527}
528impl ConstBlockPat {
529    #[inline]
530    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
531    #[inline]
532    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
533}
534pub struct ConstParam {
535    pub(crate) syntax: SyntaxNode,
536}
537impl ast::HasAttrs for ConstParam {}
538impl ast::HasName for ConstParam {}
539impl ConstParam {
540    #[inline]
541    pub fn default_val(&self) -> Option<ConstArg> { support::child(&self.syntax) }
542    #[inline]
543    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
544    #[inline]
545    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
546    #[inline]
547    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
548    #[inline]
549    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
550}
551pub struct ContinueExpr {
552    pub(crate) syntax: SyntaxNode,
553}
554impl ast::HasAttrs for ContinueExpr {}
555impl ContinueExpr {
556    #[inline]
557    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
558    #[inline]
559    pub fn continue_token(&self) -> Option<SyntaxToken> {
560        support::token(&self.syntax, T![continue])
561    }
562}
563pub struct DerefPat {
564    pub(crate) syntax: SyntaxNode,
565}
566impl DerefPat {
567    #[inline]
568    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
569    #[inline]
570    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
571    #[inline]
572    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
573    #[inline]
574    pub fn deref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![deref]) }
575}
576pub struct DocComment {
577    pub(crate) syntax: SyntaxNode,
578}
579impl DocComment {
580    #[inline]
581    pub fn inner_doc_comment_token(&self) -> Option<SyntaxToken> {
582        support::token(&self.syntax, T![inner_doc_comment])
583    }
584    #[inline]
585    pub fn outer_doc_comment_token(&self) -> Option<SyntaxToken> {
586        support::token(&self.syntax, T![outer_doc_comment])
587    }
588}
589pub struct DynTraitType {
590    pub(crate) syntax: SyntaxNode,
591}
592impl DynTraitType {
593    #[inline]
594    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
595    #[inline]
596    pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) }
597}
598pub struct Enum {
599    pub(crate) syntax: SyntaxNode,
600}
601impl ast::HasAttrs for Enum {}
602impl ast::HasGenericParams for Enum {}
603impl ast::HasName for Enum {}
604impl ast::HasVisibility for Enum {}
605impl Enum {
606    #[inline]
607    pub fn variant_list(&self) -> Option<VariantList> { support::child(&self.syntax) }
608    #[inline]
609    pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) }
610}
611pub struct ExprStmt {
612    pub(crate) syntax: SyntaxNode,
613}
614impl ExprStmt {
615    #[inline]
616    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
617    #[inline]
618    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
619}
620pub struct ExternBlock {
621    pub(crate) syntax: SyntaxNode,
622}
623impl ast::HasAttrs for ExternBlock {}
624impl ExternBlock {
625    #[inline]
626    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
627    #[inline]
628    pub fn extern_item_list(&self) -> Option<ExternItemList> { support::child(&self.syntax) }
629    #[inline]
630    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
631}
632pub struct ExternCrate {
633    pub(crate) syntax: SyntaxNode,
634}
635impl ast::HasAttrs for ExternCrate {}
636impl ast::HasVisibility for ExternCrate {}
637impl ExternCrate {
638    #[inline]
639    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
640    #[inline]
641    pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
642    #[inline]
643    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
644    #[inline]
645    pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
646    #[inline]
647    pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
648}
649pub struct ExternItemList {
650    pub(crate) syntax: SyntaxNode,
651}
652impl ast::HasAttrs for ExternItemList {}
653impl ExternItemList {
654    #[inline]
655    pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) }
656    #[inline]
657    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
658    #[inline]
659    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
660}
661pub struct FieldExpr {
662    pub(crate) syntax: SyntaxNode,
663}
664impl ast::HasAttrs for FieldExpr {}
665impl FieldExpr {
666    #[inline]
667    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
668    #[inline]
669    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
670    #[inline]
671    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
672}
673pub struct Fn {
674    pub(crate) syntax: SyntaxNode,
675}
676impl ast::HasAttrs for Fn {}
677impl ast::HasGenericParams for Fn {}
678impl ast::HasName for Fn {}
679impl ast::HasVisibility for Fn {}
680impl Fn {
681    #[inline]
682    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
683    #[inline]
684    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
685    #[inline]
686    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
687    #[inline]
688    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
689    #[inline]
690    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
691    #[inline]
692    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
693    #[inline]
694    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
695    #[inline]
696    pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
697    #[inline]
698    pub fn gen_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![gen]) }
699    #[inline]
700    pub fn safe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![safe]) }
701    #[inline]
702    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
703}
704pub struct FnPtrType {
705    pub(crate) syntax: SyntaxNode,
706}
707impl FnPtrType {
708    #[inline]
709    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
710    #[inline]
711    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
712    #[inline]
713    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
714    #[inline]
715    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
716    #[inline]
717    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
718    #[inline]
719    pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
720    #[inline]
721    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
722}
723pub struct ForBinder {
724    pub(crate) syntax: SyntaxNode,
725}
726impl ForBinder {
727    #[inline]
728    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
729    #[inline]
730    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
731}
732pub struct ForExpr {
733    pub(crate) syntax: SyntaxNode,
734}
735impl ast::HasAttrs for ForExpr {}
736impl ForExpr {
737    #[inline]
738    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
739    #[inline]
740    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
741    #[inline]
742    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
743}
744pub struct ForType {
745    pub(crate) syntax: SyntaxNode,
746}
747impl ForType {
748    #[inline]
749    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
750    #[inline]
751    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
752}
753pub struct FormatArgsArg {
754    pub(crate) syntax: SyntaxNode,
755}
756impl ast::HasName for FormatArgsArg {}
757impl FormatArgsArg {
758    #[inline]
759    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
760    #[inline]
761    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
762}
763pub struct FormatArgsExpr {
764    pub(crate) syntax: SyntaxNode,
765}
766impl ast::HasAttrs for FormatArgsExpr {}
767impl FormatArgsExpr {
768    #[inline]
769    pub fn template(&self) -> Option<Expr> { support::child(&self.syntax) }
770    #[inline]
771    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
772    #[inline]
773    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
774    #[inline]
775    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
776    #[inline]
777    pub fn format_args_token(&self) -> Option<SyntaxToken> {
778        support::token(&self.syntax, T![format_args])
779    }
780}
781pub struct GenericArgList {
782    pub(crate) syntax: SyntaxNode,
783}
784impl GenericArgList {
785    #[inline]
786    pub fn generic_args(&self) -> AstChildren<GenericArg> { support::children(&self.syntax) }
787    #[inline]
788    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
789    #[inline]
790    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
791    #[inline]
792    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
793}
794pub struct GenericParamList {
795    pub(crate) syntax: SyntaxNode,
796}
797impl GenericParamList {
798    #[inline]
799    pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
800    #[inline]
801    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
802    #[inline]
803    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
804}
805pub struct IdentPat {
806    pub(crate) syntax: SyntaxNode,
807}
808impl ast::HasAttrs for IdentPat {}
809impl ast::HasName for IdentPat {}
810impl IdentPat {
811    #[inline]
812    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
813    #[inline]
814    pub fn at_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![@]) }
815    #[inline]
816    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
817    #[inline]
818    pub fn ref_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ref]) }
819}
820pub struct IfExpr {
821    pub(crate) syntax: SyntaxNode,
822}
823impl ast::HasAttrs for IfExpr {}
824impl IfExpr {
825    #[inline]
826    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
827    #[inline]
828    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
829}
830pub struct Impl {
831    pub(crate) syntax: SyntaxNode,
832}
833impl ast::HasAttrs for Impl {}
834impl ast::HasGenericParams for Impl {}
835impl ast::HasVisibility for Impl {}
836impl Impl {
837    #[inline]
838    pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
839    #[inline]
840    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
841    #[inline]
842    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
843    #[inline]
844    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
845    #[inline]
846    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
847    #[inline]
848    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
849    #[inline]
850    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
851}
852pub struct ImplRestriction {
853    pub(crate) syntax: SyntaxNode,
854}
855impl ImplRestriction {
856    #[inline]
857    pub fn visibility_inner(&self) -> Option<VisibilityInner> { support::child(&self.syntax) }
858    #[inline]
859    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
860}
861pub struct ImplTraitType {
862    pub(crate) syntax: SyntaxNode,
863}
864impl ImplTraitType {
865    #[inline]
866    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
867    #[inline]
868    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
869}
870pub struct IncludeBytesExpr {
871    pub(crate) syntax: SyntaxNode,
872}
873impl IncludeBytesExpr {
874    #[inline]
875    pub fn include_bytes_token(&self) -> Option<SyntaxToken> {
876        support::token(&self.syntax, T![include_bytes])
877    }
878}
879pub struct IndexExpr {
880    pub(crate) syntax: SyntaxNode,
881}
882impl ast::HasAttrs for IndexExpr {}
883impl IndexExpr {
884    #[inline]
885    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
886    #[inline]
887    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
888}
889pub struct InferType {
890    pub(crate) syntax: SyntaxNode,
891}
892impl InferType {
893    #[inline]
894    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
895}
896pub struct ItemList {
897    pub(crate) syntax: SyntaxNode,
898}
899impl ast::HasAttrs for ItemList {}
900impl ast::HasModuleItem for ItemList {}
901impl ItemList {
902    #[inline]
903    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
904    #[inline]
905    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
906}
907pub struct KeyValueMeta {
908    pub(crate) syntax: SyntaxNode,
909}
910impl KeyValueMeta {
911    #[inline]
912    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
913    #[inline]
914    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
915    #[inline]
916    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
917}
918pub struct Label {
919    pub(crate) syntax: SyntaxNode,
920}
921impl Label {
922    #[inline]
923    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
924    #[inline]
925    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
926}
927pub struct LetElse {
928    pub(crate) syntax: SyntaxNode,
929}
930impl LetElse {
931    #[inline]
932    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
933    #[inline]
934    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
935}
936pub struct LetExpr {
937    pub(crate) syntax: SyntaxNode,
938}
939impl ast::HasAttrs for LetExpr {}
940impl LetExpr {
941    #[inline]
942    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
943    #[inline]
944    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
945    #[inline]
946    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
947    #[inline]
948    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
949}
950pub struct LetStmt {
951    pub(crate) syntax: SyntaxNode,
952}
953impl ast::HasAttrs for LetStmt {}
954impl LetStmt {
955    #[inline]
956    pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
957    #[inline]
958    pub fn let_else(&self) -> Option<LetElse> { support::child(&self.syntax) }
959    #[inline]
960    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
961    #[inline]
962    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
963    #[inline]
964    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
965    #[inline]
966    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
967    #[inline]
968    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
969    #[inline]
970    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
971    #[inline]
972    pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
973}
974pub struct Lifetime {
975    pub(crate) syntax: SyntaxNode,
976}
977impl Lifetime {
978    #[inline]
979    pub fn lifetime_ident_token(&self) -> Option<SyntaxToken> {
980        support::token(&self.syntax, T![lifetime_ident])
981    }
982}
983pub struct LifetimeArg {
984    pub(crate) syntax: SyntaxNode,
985}
986impl LifetimeArg {
987    #[inline]
988    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
989}
990pub struct LifetimeParam {
991    pub(crate) syntax: SyntaxNode,
992}
993impl ast::HasAttrs for LifetimeParam {}
994impl ast::HasTypeBounds for LifetimeParam {}
995impl LifetimeParam {
996    #[inline]
997    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
998}
999pub struct Literal {
1000    pub(crate) syntax: SyntaxNode,
1001}
1002impl ast::HasAttrs for Literal {}
1003impl Literal {}
1004pub struct LiteralPat {
1005    pub(crate) syntax: SyntaxNode,
1006}
1007impl LiteralPat {
1008    #[inline]
1009    pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
1010    #[inline]
1011    pub fn minus_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![-]) }
1012}
1013pub struct LoopExpr {
1014    pub(crate) syntax: SyntaxNode,
1015}
1016impl ast::HasAttrs for LoopExpr {}
1017impl ast::HasLoopBody for LoopExpr {}
1018impl LoopExpr {
1019    #[inline]
1020    pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
1021}
1022pub struct MacroCall {
1023    pub(crate) syntax: SyntaxNode,
1024}
1025impl ast::HasAttrs for MacroCall {}
1026impl MacroCall {
1027    #[inline]
1028    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1029    #[inline]
1030    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1031    #[inline]
1032    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1033    #[inline]
1034    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1035}
1036pub struct MacroDef {
1037    pub(crate) syntax: SyntaxNode,
1038}
1039impl ast::HasAttrs for MacroDef {}
1040impl ast::HasName for MacroDef {}
1041impl ast::HasVisibility for MacroDef {}
1042impl MacroDef {
1043    #[inline]
1044    pub fn macro_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![macro]) }
1045}
1046pub struct MacroExpr {
1047    pub(crate) syntax: SyntaxNode,
1048}
1049impl MacroExpr {
1050    #[inline]
1051    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
1052}
1053pub struct MacroItems {
1054    pub(crate) syntax: SyntaxNode,
1055}
1056impl ast::HasModuleItem for MacroItems {}
1057impl MacroItems {}
1058pub struct MacroPat {
1059    pub(crate) syntax: SyntaxNode,
1060}
1061impl MacroPat {
1062    #[inline]
1063    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
1064}
1065pub struct MacroRules {
1066    pub(crate) syntax: SyntaxNode,
1067}
1068impl ast::HasAttrs for MacroRules {}
1069impl ast::HasName for MacroRules {}
1070impl ast::HasVisibility for MacroRules {}
1071impl MacroRules {
1072    #[inline]
1073    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1074    #[inline]
1075    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1076    #[inline]
1077    pub fn macro_rules_token(&self) -> Option<SyntaxToken> {
1078        support::token(&self.syntax, T![macro_rules])
1079    }
1080}
1081pub struct MacroStmts {
1082    pub(crate) syntax: SyntaxNode,
1083}
1084impl MacroStmts {
1085    #[inline]
1086    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1087    #[inline]
1088    pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
1089}
1090pub struct MacroType {
1091    pub(crate) syntax: SyntaxNode,
1092}
1093impl MacroType {
1094    #[inline]
1095    pub fn macro_call(&self) -> Option<MacroCall> { support::child(&self.syntax) }
1096}
1097pub struct MatchArm {
1098    pub(crate) syntax: SyntaxNode,
1099}
1100impl ast::HasAttrs for MatchArm {}
1101impl MatchArm {
1102    #[inline]
1103    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1104    #[inline]
1105    pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
1106    #[inline]
1107    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1108    #[inline]
1109    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1110    #[inline]
1111    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
1112}
1113pub struct MatchArmList {
1114    pub(crate) syntax: SyntaxNode,
1115}
1116impl ast::HasAttrs for MatchArmList {}
1117impl MatchArmList {
1118    #[inline]
1119    pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
1120    #[inline]
1121    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1122    #[inline]
1123    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1124}
1125pub struct MatchExpr {
1126    pub(crate) syntax: SyntaxNode,
1127}
1128impl ast::HasAttrs for MatchExpr {}
1129impl MatchExpr {
1130    #[inline]
1131    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1132    #[inline]
1133    pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
1134    #[inline]
1135    pub fn match_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![match]) }
1136}
1137pub struct MatchGuard {
1138    pub(crate) syntax: SyntaxNode,
1139}
1140impl MatchGuard {
1141    #[inline]
1142    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
1143}
1144pub struct MethodCallExpr {
1145    pub(crate) syntax: SyntaxNode,
1146}
1147impl ast::HasArgList for MethodCallExpr {}
1148impl ast::HasAttrs for MethodCallExpr {}
1149impl ast::HasGenericArgs for MethodCallExpr {}
1150impl MethodCallExpr {
1151    #[inline]
1152    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1153    #[inline]
1154    pub fn receiver(&self) -> Option<Expr> { support::child(&self.syntax) }
1155    #[inline]
1156    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
1157}
1158pub struct Module {
1159    pub(crate) syntax: SyntaxNode,
1160}
1161impl ast::HasAttrs for Module {}
1162impl ast::HasName for Module {}
1163impl ast::HasVisibility for Module {}
1164impl Module {
1165    #[inline]
1166    pub fn item_list(&self) -> Option<ItemList> { support::child(&self.syntax) }
1167    #[inline]
1168    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1169    #[inline]
1170    pub fn mod_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mod]) }
1171}
1172pub struct MutRestriction {
1173    pub(crate) syntax: SyntaxNode,
1174}
1175impl MutRestriction {
1176    #[inline]
1177    pub fn visibility_inner(&self) -> Option<VisibilityInner> { support::child(&self.syntax) }
1178    #[inline]
1179    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1180}
1181pub struct Name {
1182    pub(crate) syntax: SyntaxNode,
1183}
1184impl Name {
1185    #[inline]
1186    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1187    #[inline]
1188    pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1189}
1190pub struct NameRef {
1191    pub(crate) syntax: SyntaxNode,
1192}
1193impl NameRef {
1194    #[inline]
1195    pub fn Self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![Self]) }
1196    #[inline]
1197    pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
1198    #[inline]
1199    pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) }
1200    #[inline]
1201    pub fn int_number_token(&self) -> Option<SyntaxToken> {
1202        support::token(&self.syntax, T![int_number])
1203    }
1204    #[inline]
1205    pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
1206    #[inline]
1207    pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
1208}
1209pub struct NeverType {
1210    pub(crate) syntax: SyntaxNode,
1211}
1212impl NeverType {
1213    #[inline]
1214    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1215}
1216pub struct NotNull {
1217    pub(crate) syntax: SyntaxNode,
1218}
1219impl NotNull {
1220    #[inline]
1221    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
1222    #[inline]
1223    pub fn null_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![null]) }
1224}
1225pub struct OffsetOfExpr {
1226    pub(crate) syntax: SyntaxNode,
1227}
1228impl ast::HasAttrs for OffsetOfExpr {}
1229impl OffsetOfExpr {
1230    #[inline]
1231    pub fn fields(&self) -> AstChildren<NameRef> { support::children(&self.syntax) }
1232    #[inline]
1233    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1234    #[inline]
1235    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1236    #[inline]
1237    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1238    #[inline]
1239    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1240    #[inline]
1241    pub fn offset_of_token(&self) -> Option<SyntaxToken> {
1242        support::token(&self.syntax, T![offset_of])
1243    }
1244}
1245pub struct OrPat {
1246    pub(crate) syntax: SyntaxNode,
1247}
1248impl OrPat {
1249    #[inline]
1250    pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1251    #[inline]
1252    pub fn pipe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![|]) }
1253}
1254pub struct Param {
1255    pub(crate) syntax: SyntaxNode,
1256}
1257impl ast::HasAttrs for Param {}
1258impl Param {
1259    #[inline]
1260    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1261    #[inline]
1262    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1263    #[inline]
1264    pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
1265    #[inline]
1266    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1267}
1268pub struct ParamList {
1269    pub(crate) syntax: SyntaxNode,
1270}
1271impl ParamList {
1272    #[inline]
1273    pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) }
1274    #[inline]
1275    pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) }
1276    #[inline]
1277    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1278    #[inline]
1279    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1280    #[inline]
1281    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
1282    #[inline]
1283    pub fn pipe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![|]) }
1284}
1285pub struct ParenExpr {
1286    pub(crate) syntax: SyntaxNode,
1287}
1288impl ast::HasAttrs for ParenExpr {}
1289impl ParenExpr {
1290    #[inline]
1291    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1292    #[inline]
1293    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1294    #[inline]
1295    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1296}
1297pub struct ParenPat {
1298    pub(crate) syntax: SyntaxNode,
1299}
1300impl ParenPat {
1301    #[inline]
1302    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1303    #[inline]
1304    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1305    #[inline]
1306    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1307}
1308pub struct ParenType {
1309    pub(crate) syntax: SyntaxNode,
1310}
1311impl ParenType {
1312    #[inline]
1313    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1314    #[inline]
1315    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1316    #[inline]
1317    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1318}
1319pub struct ParenthesizedArgList {
1320    pub(crate) syntax: SyntaxNode,
1321}
1322impl ParenthesizedArgList {
1323    #[inline]
1324    pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) }
1325    #[inline]
1326    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1327    #[inline]
1328    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1329    #[inline]
1330    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1331}
1332pub struct Path {
1333    pub(crate) syntax: SyntaxNode,
1334}
1335impl Path {
1336    #[inline]
1337    pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) }
1338    #[inline]
1339    pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) }
1340    #[inline]
1341    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1342}
1343pub struct PathExpr {
1344    pub(crate) syntax: SyntaxNode,
1345}
1346impl ast::HasAttrs for PathExpr {}
1347impl PathExpr {
1348    #[inline]
1349    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1350}
1351pub struct PathMeta {
1352    pub(crate) syntax: SyntaxNode,
1353}
1354impl PathMeta {
1355    #[inline]
1356    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1357}
1358pub struct PathPat {
1359    pub(crate) syntax: SyntaxNode,
1360}
1361impl PathPat {
1362    #[inline]
1363    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1364}
1365pub struct PathSegment {
1366    pub(crate) syntax: SyntaxNode,
1367}
1368impl ast::HasGenericArgs for PathSegment {}
1369impl PathSegment {
1370    #[inline]
1371    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1372    #[inline]
1373    pub fn parenthesized_arg_list(&self) -> Option<ParenthesizedArgList> {
1374        support::child(&self.syntax)
1375    }
1376    #[inline]
1377    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
1378    #[inline]
1379    pub fn return_type_syntax(&self) -> Option<ReturnTypeSyntax> { support::child(&self.syntax) }
1380    #[inline]
1381    pub fn type_anchor(&self) -> Option<TypeAnchor> { support::child(&self.syntax) }
1382    #[inline]
1383    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
1384}
1385pub struct PathType {
1386    pub(crate) syntax: SyntaxNode,
1387}
1388impl PathType {
1389    #[inline]
1390    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1391}
1392pub struct PatternType {
1393    pub(crate) syntax: SyntaxNode,
1394}
1395impl PatternType {
1396    #[inline]
1397    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1398    #[inline]
1399    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1400    #[inline]
1401    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1402    #[inline]
1403    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1404    #[inline]
1405    pub fn is_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![is]) }
1406    #[inline]
1407    pub fn pattern_type_token(&self) -> Option<SyntaxToken> {
1408        support::token(&self.syntax, T![pattern_type])
1409    }
1410}
1411pub struct PrefixExpr {
1412    pub(crate) syntax: SyntaxNode,
1413}
1414impl ast::HasAttrs for PrefixExpr {}
1415impl PrefixExpr {
1416    #[inline]
1417    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1418}
1419pub struct PtrType {
1420    pub(crate) syntax: SyntaxNode,
1421}
1422impl PtrType {
1423    #[inline]
1424    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1425    #[inline]
1426    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
1427    #[inline]
1428    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1429    #[inline]
1430    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1431}
1432pub struct RangeExpr {
1433    pub(crate) syntax: SyntaxNode,
1434}
1435impl ast::HasAttrs for RangeExpr {}
1436impl RangeExpr {}
1437pub struct RangePat {
1438    pub(crate) syntax: SyntaxNode,
1439}
1440impl RangePat {}
1441pub struct RecordExpr {
1442    pub(crate) syntax: SyntaxNode,
1443}
1444impl RecordExpr {
1445    #[inline]
1446    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1447    #[inline]
1448    pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> {
1449        support::child(&self.syntax)
1450    }
1451}
1452pub struct RecordExprField {
1453    pub(crate) syntax: SyntaxNode,
1454}
1455impl ast::HasAttrs for RecordExprField {}
1456impl RecordExprField {
1457    #[inline]
1458    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1459    #[inline]
1460    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1461    #[inline]
1462    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1463}
1464pub struct RecordExprFieldList {
1465    pub(crate) syntax: SyntaxNode,
1466}
1467impl ast::HasAttrs for RecordExprFieldList {}
1468impl RecordExprFieldList {
1469    #[inline]
1470    pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) }
1471    #[inline]
1472    pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
1473    #[inline]
1474    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1475    #[inline]
1476    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1477    #[inline]
1478    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1479}
1480pub struct RecordField {
1481    pub(crate) syntax: SyntaxNode,
1482}
1483impl ast::HasAttrs for RecordField {}
1484impl ast::HasName for RecordField {}
1485impl ast::HasVisibility for RecordField {}
1486impl RecordField {
1487    #[inline]
1488    pub fn default_val(&self) -> Option<ConstArg> { support::child(&self.syntax) }
1489    #[inline]
1490    pub fn mut_restriction(&self) -> Option<MutRestriction> { support::child(&self.syntax) }
1491    #[inline]
1492    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1493    #[inline]
1494    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1495    #[inline]
1496    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1497    #[inline]
1498    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1499}
1500pub struct RecordFieldList {
1501    pub(crate) syntax: SyntaxNode,
1502}
1503impl RecordFieldList {
1504    #[inline]
1505    pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) }
1506    #[inline]
1507    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1508    #[inline]
1509    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1510}
1511pub struct RecordPat {
1512    pub(crate) syntax: SyntaxNode,
1513}
1514impl RecordPat {
1515    #[inline]
1516    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1517    #[inline]
1518    pub fn record_pat_field_list(&self) -> Option<RecordPatFieldList> {
1519        support::child(&self.syntax)
1520    }
1521}
1522pub struct RecordPatField {
1523    pub(crate) syntax: SyntaxNode,
1524}
1525impl ast::HasAttrs for RecordPatField {}
1526impl RecordPatField {
1527    #[inline]
1528    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1529    #[inline]
1530    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1531    #[inline]
1532    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1533}
1534pub struct RecordPatFieldList {
1535    pub(crate) syntax: SyntaxNode,
1536}
1537impl RecordPatFieldList {
1538    #[inline]
1539    pub fn fields(&self) -> AstChildren<RecordPatField> { support::children(&self.syntax) }
1540    #[inline]
1541    pub fn rest_pat(&self) -> Option<RestPat> { support::child(&self.syntax) }
1542    #[inline]
1543    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1544    #[inline]
1545    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1546}
1547pub struct RefExpr {
1548    pub(crate) syntax: SyntaxNode,
1549}
1550impl ast::HasAttrs for RefExpr {}
1551impl RefExpr {
1552    #[inline]
1553    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1554    #[inline]
1555    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1556    #[inline]
1557    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1558    #[inline]
1559    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1560    #[inline]
1561    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
1562}
1563pub struct RefPat {
1564    pub(crate) syntax: SyntaxNode,
1565}
1566impl RefPat {
1567    #[inline]
1568    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1569    #[inline]
1570    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1571    #[inline]
1572    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1573}
1574pub struct RefType {
1575    pub(crate) syntax: SyntaxNode,
1576}
1577impl RefType {
1578    #[inline]
1579    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1580    #[inline]
1581    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1582    #[inline]
1583    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1584    #[inline]
1585    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1586}
1587pub struct Rename {
1588    pub(crate) syntax: SyntaxNode,
1589}
1590impl ast::HasName for Rename {}
1591impl Rename {
1592    #[inline]
1593    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1594    #[inline]
1595    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1596}
1597pub struct RestPat {
1598    pub(crate) syntax: SyntaxNode,
1599}
1600impl ast::HasAttrs for RestPat {}
1601impl RestPat {
1602    #[inline]
1603    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1604}
1605pub struct RetType {
1606    pub(crate) syntax: SyntaxNode,
1607}
1608impl RetType {
1609    #[inline]
1610    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1611    #[inline]
1612    pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
1613}
1614pub struct ReturnExpr {
1615    pub(crate) syntax: SyntaxNode,
1616}
1617impl ast::HasAttrs for ReturnExpr {}
1618impl ReturnExpr {
1619    #[inline]
1620    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1621    #[inline]
1622    pub fn return_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![return]) }
1623}
1624pub struct ReturnTypeSyntax {
1625    pub(crate) syntax: SyntaxNode,
1626}
1627impl ReturnTypeSyntax {
1628    #[inline]
1629    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1630    #[inline]
1631    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1632    #[inline]
1633    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1634}
1635pub struct SelfParam {
1636    pub(crate) syntax: SyntaxNode,
1637}
1638impl ast::HasAttrs for SelfParam {}
1639impl ast::HasName for SelfParam {}
1640impl SelfParam {
1641    #[inline]
1642    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1643    #[inline]
1644    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1645    #[inline]
1646    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
1647    #[inline]
1648    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1649    #[inline]
1650    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1651}
1652pub struct SlicePat {
1653    pub(crate) syntax: SyntaxNode,
1654}
1655impl SlicePat {
1656    #[inline]
1657    pub fn pats(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1658    #[inline]
1659    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1660    #[inline]
1661    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1662}
1663pub struct SliceType {
1664    pub(crate) syntax: SyntaxNode,
1665}
1666impl SliceType {
1667    #[inline]
1668    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1669    #[inline]
1670    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1671    #[inline]
1672    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1673}
1674pub struct SourceFile {
1675    pub(crate) syntax: SyntaxNode,
1676}
1677impl ast::HasAttrs for SourceFile {}
1678impl ast::HasModuleItem for SourceFile {}
1679impl SourceFile {
1680    #[inline]
1681    pub fn frontmatter_token(&self) -> Option<SyntaxToken> {
1682        support::token(&self.syntax, T![frontmatter])
1683    }
1684    #[inline]
1685    pub fn shebang_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![shebang]) }
1686}
1687pub struct Static {
1688    pub(crate) syntax: SyntaxNode,
1689}
1690impl ast::HasAttrs for Static {}
1691impl ast::HasName for Static {}
1692impl ast::HasVisibility for Static {}
1693impl Static {
1694    #[inline]
1695    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1696    #[inline]
1697    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1698    #[inline]
1699    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1700    #[inline]
1701    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1702    #[inline]
1703    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
1704    #[inline]
1705    pub fn safe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![safe]) }
1706    #[inline]
1707    pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
1708    #[inline]
1709    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1710}
1711pub struct StmtList {
1712    pub(crate) syntax: SyntaxNode,
1713}
1714impl ast::HasAttrs for StmtList {}
1715impl StmtList {
1716    #[inline]
1717    pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
1718    #[inline]
1719    pub fn tail_expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1720    #[inline]
1721    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1722    #[inline]
1723    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1724}
1725pub struct Struct {
1726    pub(crate) syntax: SyntaxNode,
1727}
1728impl ast::HasAttrs for Struct {}
1729impl ast::HasGenericParams for Struct {}
1730impl ast::HasName for Struct {}
1731impl ast::HasVisibility for Struct {}
1732impl Struct {
1733    #[inline]
1734    pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
1735    #[inline]
1736    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1737    #[inline]
1738    pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) }
1739}
1740pub struct TokenTree {
1741    pub(crate) syntax: SyntaxNode,
1742}
1743impl TokenTree {
1744    #[inline]
1745    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1746    #[inline]
1747    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1748    #[inline]
1749    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1750    #[inline]
1751    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1752    #[inline]
1753    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1754    #[inline]
1755    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
1756}
1757pub struct TokenTreeMeta {
1758    pub(crate) syntax: SyntaxNode,
1759}
1760impl TokenTreeMeta {
1761    #[inline]
1762    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1763    #[inline]
1764    pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1765}
1766pub struct Trait {
1767    pub(crate) syntax: SyntaxNode,
1768}
1769impl ast::HasAttrs for Trait {}
1770impl ast::HasGenericParams for Trait {}
1771impl ast::HasName for Trait {}
1772impl ast::HasTypeBounds for Trait {}
1773impl ast::HasVisibility for Trait {}
1774impl Trait {
1775    #[inline]
1776    pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
1777    #[inline]
1778    pub fn impl_restriction(&self) -> Option<ImplRestriction> { support::child(&self.syntax) }
1779    #[inline]
1780    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1781    #[inline]
1782    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1783    #[inline]
1784    pub fn auto_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![auto]) }
1785    #[inline]
1786    pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) }
1787    #[inline]
1788    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
1789}
1790pub struct TryBlockModifier {
1791    pub(crate) syntax: SyntaxNode,
1792}
1793impl TryBlockModifier {
1794    #[inline]
1795    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1796    #[inline]
1797    pub fn bikeshed_token(&self) -> Option<SyntaxToken> {
1798        support::token(&self.syntax, T![bikeshed])
1799    }
1800    #[inline]
1801    pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
1802}
1803pub struct TryExpr {
1804    pub(crate) syntax: SyntaxNode,
1805}
1806impl ast::HasAttrs for TryExpr {}
1807impl TryExpr {
1808    #[inline]
1809    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
1810    #[inline]
1811    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
1812}
1813pub struct TupleExpr {
1814    pub(crate) syntax: SyntaxNode,
1815}
1816impl ast::HasAttrs for TupleExpr {}
1817impl TupleExpr {
1818    #[inline]
1819    pub fn fields(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
1820    #[inline]
1821    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1822    #[inline]
1823    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1824}
1825pub struct TupleField {
1826    pub(crate) syntax: SyntaxNode,
1827}
1828impl ast::HasAttrs for TupleField {}
1829impl ast::HasVisibility for TupleField {}
1830impl TupleField {
1831    #[inline]
1832    pub fn mut_restriction(&self) -> Option<MutRestriction> { support::child(&self.syntax) }
1833    #[inline]
1834    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1835}
1836pub struct TupleFieldList {
1837    pub(crate) syntax: SyntaxNode,
1838}
1839impl TupleFieldList {
1840    #[inline]
1841    pub fn fields(&self) -> AstChildren<TupleField> { support::children(&self.syntax) }
1842    #[inline]
1843    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1844    #[inline]
1845    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1846}
1847pub struct TuplePat {
1848    pub(crate) syntax: SyntaxNode,
1849}
1850impl TuplePat {
1851    #[inline]
1852    pub fn fields(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1853    #[inline]
1854    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1855    #[inline]
1856    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1857}
1858pub struct TupleStructPat {
1859    pub(crate) syntax: SyntaxNode,
1860}
1861impl TupleStructPat {
1862    #[inline]
1863    pub fn fields(&self) -> AstChildren<Pat> { support::children(&self.syntax) }
1864    #[inline]
1865    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1866    #[inline]
1867    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1868    #[inline]
1869    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1870}
1871pub struct TupleType {
1872    pub(crate) syntax: SyntaxNode,
1873}
1874impl TupleType {
1875    #[inline]
1876    pub fn fields(&self) -> AstChildren<Type> { support::children(&self.syntax) }
1877    #[inline]
1878    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1879    #[inline]
1880    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1881}
1882pub struct TypeAlias {
1883    pub(crate) syntax: SyntaxNode,
1884}
1885impl ast::HasAttrs for TypeAlias {}
1886impl ast::HasGenericParams for TypeAlias {}
1887impl ast::HasName for TypeAlias {}
1888impl ast::HasTypeBounds for TypeAlias {}
1889impl ast::HasVisibility for TypeAlias {}
1890impl TypeAlias {
1891    #[inline]
1892    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1893    #[inline]
1894    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
1895    #[inline]
1896    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1897    #[inline]
1898    pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
1899    #[inline]
1900    pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
1901}
1902pub struct TypeAnchor {
1903    pub(crate) syntax: SyntaxNode,
1904}
1905impl TypeAnchor {
1906    #[inline]
1907    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
1908    #[inline]
1909    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
1910    #[inline]
1911    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
1912}
1913pub struct TypeArg {
1914    pub(crate) syntax: SyntaxNode,
1915}
1916impl TypeArg {
1917    #[inline]
1918    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1919}
1920pub struct TypeBound {
1921    pub(crate) syntax: SyntaxNode,
1922}
1923impl TypeBound {
1924    #[inline]
1925    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
1926    #[inline]
1927    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
1928    #[inline]
1929    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
1930    #[inline]
1931    pub fn use_bound_generic_args(&self) -> Option<UseBoundGenericArgs> {
1932        support::child(&self.syntax)
1933    }
1934    #[inline]
1935    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
1936    #[inline]
1937    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
1938    #[inline]
1939    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
1940    #[inline]
1941    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
1942    #[inline]
1943    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
1944    #[inline]
1945    pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
1946    #[inline]
1947    pub fn tilde_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![~]) }
1948}
1949pub struct TypeBoundList {
1950    pub(crate) syntax: SyntaxNode,
1951}
1952impl TypeBoundList {
1953    #[inline]
1954    pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
1955}
1956pub struct TypeParam {
1957    pub(crate) syntax: SyntaxNode,
1958}
1959impl ast::HasAttrs for TypeParam {}
1960impl ast::HasName for TypeParam {}
1961impl ast::HasTypeBounds for TypeParam {}
1962impl TypeParam {
1963    #[inline]
1964    pub fn default_type(&self) -> Option<Type> { support::child(&self.syntax) }
1965    #[inline]
1966    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
1967}
1968pub struct UnderscoreExpr {
1969    pub(crate) syntax: SyntaxNode,
1970}
1971impl ast::HasAttrs for UnderscoreExpr {}
1972impl UnderscoreExpr {
1973    #[inline]
1974    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
1975}
1976pub struct Union {
1977    pub(crate) syntax: SyntaxNode,
1978}
1979impl ast::HasAttrs for Union {}
1980impl ast::HasGenericParams for Union {}
1981impl ast::HasName for Union {}
1982impl ast::HasVisibility for Union {}
1983impl Union {
1984    #[inline]
1985    pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) }
1986    #[inline]
1987    pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) }
1988}
1989pub struct UnsafeMeta {
1990    pub(crate) syntax: SyntaxNode,
1991}
1992impl UnsafeMeta {
1993    #[inline]
1994    pub fn meta(&self) -> Option<Meta> { support::child(&self.syntax) }
1995    #[inline]
1996    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
1997    #[inline]
1998    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
1999    #[inline]
2000    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
2001}
2002pub struct Use {
2003    pub(crate) syntax: SyntaxNode,
2004}
2005impl ast::HasAttrs for Use {}
2006impl ast::HasVisibility for Use {}
2007impl Use {
2008    #[inline]
2009    pub fn use_tree(&self) -> Option<UseTree> { support::child(&self.syntax) }
2010    #[inline]
2011    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
2012    #[inline]
2013    pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
2014}
2015pub struct UseBoundGenericArgs {
2016    pub(crate) syntax: SyntaxNode,
2017}
2018impl UseBoundGenericArgs {
2019    #[inline]
2020    pub fn use_bound_generic_args(&self) -> AstChildren<UseBoundGenericArg> {
2021        support::children(&self.syntax)
2022    }
2023    #[inline]
2024    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
2025    #[inline]
2026    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
2027}
2028pub struct UseTree {
2029    pub(crate) syntax: SyntaxNode,
2030}
2031impl UseTree {
2032    #[inline]
2033    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2034    #[inline]
2035    pub fn rename(&self) -> Option<Rename> { support::child(&self.syntax) }
2036    #[inline]
2037    pub fn use_tree_list(&self) -> Option<UseTreeList> { support::child(&self.syntax) }
2038    #[inline]
2039    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
2040    #[inline]
2041    pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
2042}
2043pub struct UseTreeList {
2044    pub(crate) syntax: SyntaxNode,
2045}
2046impl UseTreeList {
2047    #[inline]
2048    pub fn use_trees(&self) -> AstChildren<UseTree> { support::children(&self.syntax) }
2049    #[inline]
2050    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
2051    #[inline]
2052    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2053}
2054pub struct Variant {
2055    pub(crate) syntax: SyntaxNode,
2056}
2057impl ast::HasAttrs for Variant {}
2058impl ast::HasName for Variant {}
2059impl ast::HasVisibility for Variant {}
2060impl Variant {
2061    #[inline]
2062    pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
2063    #[inline]
2064    pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
2065    #[inline]
2066    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
2067    #[inline]
2068    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
2069}
2070pub struct VariantList {
2071    pub(crate) syntax: SyntaxNode,
2072}
2073impl VariantList {
2074    #[inline]
2075    pub fn variants(&self) -> AstChildren<Variant> { support::children(&self.syntax) }
2076    #[inline]
2077    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
2078    #[inline]
2079    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
2080}
2081pub struct Visibility {
2082    pub(crate) syntax: SyntaxNode,
2083}
2084impl Visibility {
2085    #[inline]
2086    pub fn visibility_inner(&self) -> Option<VisibilityInner> { support::child(&self.syntax) }
2087    #[inline]
2088    pub fn pub_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![pub]) }
2089}
2090pub struct VisibilityInner {
2091    pub(crate) syntax: SyntaxNode,
2092}
2093impl VisibilityInner {
2094    #[inline]
2095    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
2096    #[inline]
2097    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
2098    #[inline]
2099    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
2100    #[inline]
2101    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
2102}
2103pub struct WhereClause {
2104    pub(crate) syntax: SyntaxNode,
2105}
2106impl WhereClause {
2107    #[inline]
2108    pub fn predicates(&self) -> AstChildren<WherePred> { support::children(&self.syntax) }
2109    #[inline]
2110    pub fn where_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![where]) }
2111}
2112pub struct WherePred {
2113    pub(crate) syntax: SyntaxNode,
2114}
2115impl ast::HasTypeBounds for WherePred {}
2116impl WherePred {
2117    #[inline]
2118    pub fn for_binder(&self) -> Option<ForBinder> { support::child(&self.syntax) }
2119    #[inline]
2120    pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
2121    #[inline]
2122    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
2123}
2124pub struct WhileExpr {
2125    pub(crate) syntax: SyntaxNode,
2126}
2127impl ast::HasAttrs for WhileExpr {}
2128impl WhileExpr {
2129    #[inline]
2130    pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
2131}
2132pub struct WildcardPat {
2133    pub(crate) syntax: SyntaxNode,
2134}
2135impl WildcardPat {
2136    #[inline]
2137    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
2138}
2139pub struct YeetExpr {
2140    pub(crate) syntax: SyntaxNode,
2141}
2142impl ast::HasAttrs for YeetExpr {}
2143impl YeetExpr {
2144    #[inline]
2145    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2146    #[inline]
2147    pub fn do_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![do]) }
2148    #[inline]
2149    pub fn yeet_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![yeet]) }
2150}
2151pub struct YieldExpr {
2152    pub(crate) syntax: SyntaxNode,
2153}
2154impl ast::HasAttrs for YieldExpr {}
2155impl YieldExpr {
2156    #[inline]
2157    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
2158    #[inline]
2159    pub fn yield_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![yield]) }
2160}
2161
2162#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2163pub enum Adt {
2164    Enum(Enum),
2165    Struct(Struct),
2166    Union(Union),
2167}
2168impl ast::HasAttrs for Adt {}
2169impl ast::HasGenericParams for Adt {}
2170impl ast::HasName for Adt {}
2171impl ast::HasVisibility for Adt {}
2172
2173#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2174pub enum AnyAttr {
2175    Attr(Attr),
2176    DocComment(DocComment),
2177}
2178
2179#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2180pub enum AsmOperand {
2181    AsmConst(AsmConst),
2182    AsmLabel(AsmLabel),
2183    AsmRegOperand(AsmRegOperand),
2184    AsmSym(AsmSym),
2185}
2186
2187#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2188pub enum AsmPiece {
2189    AsmClobberAbi(AsmClobberAbi),
2190    AsmOperandNamed(AsmOperandNamed),
2191    AsmOptions(AsmOptions),
2192}
2193impl ast::HasAttrs for AsmPiece {}
2194
2195#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2196pub enum AssocItem {
2197    Const(Const),
2198    Fn(Fn),
2199    MacroCall(MacroCall),
2200    TypeAlias(TypeAlias),
2201}
2202impl ast::HasAttrs for AssocItem {}
2203
2204#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2205pub enum CfgPredicate {
2206    CfgAtom(CfgAtom),
2207    CfgComposite(CfgComposite),
2208}
2209
2210#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2211pub enum Expr {
2212    ArrayExpr(ArrayExpr),
2213    AsmExpr(AsmExpr),
2214    AwaitExpr(AwaitExpr),
2215    BecomeExpr(BecomeExpr),
2216    BinExpr(BinExpr),
2217    BlockExpr(BlockExpr),
2218    BreakExpr(BreakExpr),
2219    CallExpr(CallExpr),
2220    CastExpr(CastExpr),
2221    CfgPredExpr(CfgPredExpr),
2222    ClosureExpr(ClosureExpr),
2223    ContinueExpr(ContinueExpr),
2224    FieldExpr(FieldExpr),
2225    ForExpr(ForExpr),
2226    FormatArgsExpr(FormatArgsExpr),
2227    IfExpr(IfExpr),
2228    IncludeBytesExpr(IncludeBytesExpr),
2229    IndexExpr(IndexExpr),
2230    LetExpr(LetExpr),
2231    Literal(Literal),
2232    LoopExpr(LoopExpr),
2233    MacroExpr(MacroExpr),
2234    MatchExpr(MatchExpr),
2235    MethodCallExpr(MethodCallExpr),
2236    OffsetOfExpr(OffsetOfExpr),
2237    ParenExpr(ParenExpr),
2238    PathExpr(PathExpr),
2239    PrefixExpr(PrefixExpr),
2240    RangeExpr(RangeExpr),
2241    RecordExpr(RecordExpr),
2242    RefExpr(RefExpr),
2243    ReturnExpr(ReturnExpr),
2244    TryExpr(TryExpr),
2245    TupleExpr(TupleExpr),
2246    UnderscoreExpr(UnderscoreExpr),
2247    WhileExpr(WhileExpr),
2248    YeetExpr(YeetExpr),
2249    YieldExpr(YieldExpr),
2250}
2251
2252#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2253pub enum ExternItem {
2254    Fn(Fn),
2255    MacroCall(MacroCall),
2256    Static(Static),
2257    TypeAlias(TypeAlias),
2258}
2259impl ast::HasAttrs for ExternItem {}
2260
2261#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2262pub enum FieldList {
2263    RecordFieldList(RecordFieldList),
2264    TupleFieldList(TupleFieldList),
2265}
2266
2267#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2268pub enum GenericArg {
2269    AssocTypeArg(AssocTypeArg),
2270    ConstArg(ConstArg),
2271    LifetimeArg(LifetimeArg),
2272    TypeArg(TypeArg),
2273}
2274
2275#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2276pub enum GenericParam {
2277    ConstParam(ConstParam),
2278    LifetimeParam(LifetimeParam),
2279    TypeParam(TypeParam),
2280}
2281impl ast::HasAttrs for GenericParam {}
2282
2283#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2284pub enum Item {
2285    AsmExpr(AsmExpr),
2286    Const(Const),
2287    Enum(Enum),
2288    ExternBlock(ExternBlock),
2289    ExternCrate(ExternCrate),
2290    Fn(Fn),
2291    Impl(Impl),
2292    MacroCall(MacroCall),
2293    MacroDef(MacroDef),
2294    MacroRules(MacroRules),
2295    Module(Module),
2296    Static(Static),
2297    Struct(Struct),
2298    Trait(Trait),
2299    TypeAlias(TypeAlias),
2300    Union(Union),
2301    Use(Use),
2302}
2303impl ast::HasAttrs for Item {}
2304
2305#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2306pub enum Meta {
2307    CfgAttrMeta(CfgAttrMeta),
2308    CfgMeta(CfgMeta),
2309    KeyValueMeta(KeyValueMeta),
2310    PathMeta(PathMeta),
2311    TokenTreeMeta(TokenTreeMeta),
2312    UnsafeMeta(UnsafeMeta),
2313}
2314
2315#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2316pub enum Pat {
2317    BoxPat(BoxPat),
2318    CfgPredPat(CfgPredPat),
2319    ConstBlockPat(ConstBlockPat),
2320    DerefPat(DerefPat),
2321    IdentPat(IdentPat),
2322    LiteralPat(LiteralPat),
2323    MacroPat(MacroPat),
2324    NotNull(NotNull),
2325    OrPat(OrPat),
2326    ParenPat(ParenPat),
2327    PathPat(PathPat),
2328    RangePat(RangePat),
2329    RecordPat(RecordPat),
2330    RefPat(RefPat),
2331    RestPat(RestPat),
2332    SlicePat(SlicePat),
2333    TuplePat(TuplePat),
2334    TupleStructPat(TupleStructPat),
2335    WildcardPat(WildcardPat),
2336}
2337
2338#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2339pub enum Stmt {
2340    ExprStmt(ExprStmt),
2341    Item(Item),
2342    LetStmt(LetStmt),
2343}
2344
2345#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2346pub enum Type {
2347    ArrayType(ArrayType),
2348    DynTraitType(DynTraitType),
2349    FnPtrType(FnPtrType),
2350    ForType(ForType),
2351    ImplTraitType(ImplTraitType),
2352    InferType(InferType),
2353    MacroType(MacroType),
2354    NeverType(NeverType),
2355    ParenType(ParenType),
2356    PathType(PathType),
2357    PatternType(PatternType),
2358    PtrType(PtrType),
2359    RefType(RefType),
2360    SliceType(SliceType),
2361    TupleType(TupleType),
2362}
2363
2364#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2365pub enum UseBoundGenericArg {
2366    Lifetime(Lifetime),
2367    NameRef(NameRef),
2368}
2369
2370#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2371pub enum VariantDef {
2372    Struct(Struct),
2373    Union(Union),
2374    Variant(Variant),
2375}
2376impl ast::HasAttrs for VariantDef {}
2377impl ast::HasName for VariantDef {}
2378impl ast::HasVisibility for VariantDef {}
2379pub struct AnyHasArgList {
2380    pub(crate) syntax: SyntaxNode,
2381}
2382impl AnyHasArgList {
2383    #[inline]
2384    pub fn new<T: ast::HasArgList>(node: T) -> AnyHasArgList {
2385        AnyHasArgList { syntax: node.syntax().clone() }
2386    }
2387}
2388pub struct AnyHasAttrs {
2389    pub(crate) syntax: SyntaxNode,
2390}
2391impl AnyHasAttrs {
2392    #[inline]
2393    pub fn new<T: ast::HasAttrs>(node: T) -> AnyHasAttrs {
2394        AnyHasAttrs { syntax: node.syntax().clone() }
2395    }
2396}
2397pub struct AnyHasGenericArgs {
2398    pub(crate) syntax: SyntaxNode,
2399}
2400impl AnyHasGenericArgs {
2401    #[inline]
2402    pub fn new<T: ast::HasGenericArgs>(node: T) -> AnyHasGenericArgs {
2403        AnyHasGenericArgs { syntax: node.syntax().clone() }
2404    }
2405}
2406pub struct AnyHasGenericParams {
2407    pub(crate) syntax: SyntaxNode,
2408}
2409impl AnyHasGenericParams {
2410    #[inline]
2411    pub fn new<T: ast::HasGenericParams>(node: T) -> AnyHasGenericParams {
2412        AnyHasGenericParams { syntax: node.syntax().clone() }
2413    }
2414}
2415pub struct AnyHasLoopBody {
2416    pub(crate) syntax: SyntaxNode,
2417}
2418impl AnyHasLoopBody {
2419    #[inline]
2420    pub fn new<T: ast::HasLoopBody>(node: T) -> AnyHasLoopBody {
2421        AnyHasLoopBody { syntax: node.syntax().clone() }
2422    }
2423}
2424pub struct AnyHasModuleItem {
2425    pub(crate) syntax: SyntaxNode,
2426}
2427impl AnyHasModuleItem {
2428    #[inline]
2429    pub fn new<T: ast::HasModuleItem>(node: T) -> AnyHasModuleItem {
2430        AnyHasModuleItem { syntax: node.syntax().clone() }
2431    }
2432}
2433pub struct AnyHasName {
2434    pub(crate) syntax: SyntaxNode,
2435}
2436impl AnyHasName {
2437    #[inline]
2438    pub fn new<T: ast::HasName>(node: T) -> AnyHasName {
2439        AnyHasName { syntax: node.syntax().clone() }
2440    }
2441}
2442pub struct AnyHasTypeBounds {
2443    pub(crate) syntax: SyntaxNode,
2444}
2445impl AnyHasTypeBounds {
2446    #[inline]
2447    pub fn new<T: ast::HasTypeBounds>(node: T) -> AnyHasTypeBounds {
2448        AnyHasTypeBounds { syntax: node.syntax().clone() }
2449    }
2450}
2451pub struct AnyHasVisibility {
2452    pub(crate) syntax: SyntaxNode,
2453}
2454impl AnyHasVisibility {
2455    #[inline]
2456    pub fn new<T: ast::HasVisibility>(node: T) -> AnyHasVisibility {
2457        AnyHasVisibility { syntax: node.syntax().clone() }
2458    }
2459}
2460impl AstNode for Abi {
2461    #[inline]
2462    fn kind() -> SyntaxKind
2463    where
2464        Self: Sized,
2465    {
2466        ABI
2467    }
2468    #[inline]
2469    fn can_cast(kind: SyntaxKind) -> bool { kind == ABI }
2470    #[inline]
2471    fn cast(syntax: SyntaxNode) -> Option<Self> {
2472        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2473    }
2474    #[inline]
2475    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2476}
2477impl hash::Hash for Abi {
2478    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2479}
2480impl Eq for Abi {}
2481impl PartialEq for Abi {
2482    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2483}
2484impl Clone for Abi {
2485    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2486}
2487impl fmt::Debug for Abi {
2488    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2489        f.debug_struct("Abi").field("syntax", &self.syntax).finish()
2490    }
2491}
2492impl AstNode for ArgList {
2493    #[inline]
2494    fn kind() -> SyntaxKind
2495    where
2496        Self: Sized,
2497    {
2498        ARG_LIST
2499    }
2500    #[inline]
2501    fn can_cast(kind: SyntaxKind) -> bool { kind == ARG_LIST }
2502    #[inline]
2503    fn cast(syntax: SyntaxNode) -> Option<Self> {
2504        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2505    }
2506    #[inline]
2507    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2508}
2509impl hash::Hash for ArgList {
2510    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2511}
2512impl Eq for ArgList {}
2513impl PartialEq for ArgList {
2514    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2515}
2516impl Clone for ArgList {
2517    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2518}
2519impl fmt::Debug for ArgList {
2520    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2521        f.debug_struct("ArgList").field("syntax", &self.syntax).finish()
2522    }
2523}
2524impl AstNode for ArrayExpr {
2525    #[inline]
2526    fn kind() -> SyntaxKind
2527    where
2528        Self: Sized,
2529    {
2530        ARRAY_EXPR
2531    }
2532    #[inline]
2533    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR }
2534    #[inline]
2535    fn cast(syntax: SyntaxNode) -> Option<Self> {
2536        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2537    }
2538    #[inline]
2539    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2540}
2541impl hash::Hash for ArrayExpr {
2542    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2543}
2544impl Eq for ArrayExpr {}
2545impl PartialEq for ArrayExpr {
2546    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2547}
2548impl Clone for ArrayExpr {
2549    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2550}
2551impl fmt::Debug for ArrayExpr {
2552    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2553        f.debug_struct("ArrayExpr").field("syntax", &self.syntax).finish()
2554    }
2555}
2556impl AstNode for ArrayType {
2557    #[inline]
2558    fn kind() -> SyntaxKind
2559    where
2560        Self: Sized,
2561    {
2562        ARRAY_TYPE
2563    }
2564    #[inline]
2565    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE }
2566    #[inline]
2567    fn cast(syntax: SyntaxNode) -> Option<Self> {
2568        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2569    }
2570    #[inline]
2571    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2572}
2573impl hash::Hash for ArrayType {
2574    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2575}
2576impl Eq for ArrayType {}
2577impl PartialEq for ArrayType {
2578    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2579}
2580impl Clone for ArrayType {
2581    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2582}
2583impl fmt::Debug for ArrayType {
2584    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2585        f.debug_struct("ArrayType").field("syntax", &self.syntax).finish()
2586    }
2587}
2588impl AstNode for AsmClobberAbi {
2589    #[inline]
2590    fn kind() -> SyntaxKind
2591    where
2592        Self: Sized,
2593    {
2594        ASM_CLOBBER_ABI
2595    }
2596    #[inline]
2597    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_CLOBBER_ABI }
2598    #[inline]
2599    fn cast(syntax: SyntaxNode) -> Option<Self> {
2600        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2601    }
2602    #[inline]
2603    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2604}
2605impl hash::Hash for AsmClobberAbi {
2606    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2607}
2608impl Eq for AsmClobberAbi {}
2609impl PartialEq for AsmClobberAbi {
2610    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2611}
2612impl Clone for AsmClobberAbi {
2613    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2614}
2615impl fmt::Debug for AsmClobberAbi {
2616    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2617        f.debug_struct("AsmClobberAbi").field("syntax", &self.syntax).finish()
2618    }
2619}
2620impl AstNode for AsmConst {
2621    #[inline]
2622    fn kind() -> SyntaxKind
2623    where
2624        Self: Sized,
2625    {
2626        ASM_CONST
2627    }
2628    #[inline]
2629    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_CONST }
2630    #[inline]
2631    fn cast(syntax: SyntaxNode) -> Option<Self> {
2632        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2633    }
2634    #[inline]
2635    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2636}
2637impl hash::Hash for AsmConst {
2638    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2639}
2640impl Eq for AsmConst {}
2641impl PartialEq for AsmConst {
2642    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2643}
2644impl Clone for AsmConst {
2645    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2646}
2647impl fmt::Debug for AsmConst {
2648    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2649        f.debug_struct("AsmConst").field("syntax", &self.syntax).finish()
2650    }
2651}
2652impl AstNode for AsmDirSpec {
2653    #[inline]
2654    fn kind() -> SyntaxKind
2655    where
2656        Self: Sized,
2657    {
2658        ASM_DIR_SPEC
2659    }
2660    #[inline]
2661    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_DIR_SPEC }
2662    #[inline]
2663    fn cast(syntax: SyntaxNode) -> Option<Self> {
2664        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2665    }
2666    #[inline]
2667    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2668}
2669impl hash::Hash for AsmDirSpec {
2670    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2671}
2672impl Eq for AsmDirSpec {}
2673impl PartialEq for AsmDirSpec {
2674    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2675}
2676impl Clone for AsmDirSpec {
2677    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2678}
2679impl fmt::Debug for AsmDirSpec {
2680    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2681        f.debug_struct("AsmDirSpec").field("syntax", &self.syntax).finish()
2682    }
2683}
2684impl AstNode for AsmExpr {
2685    #[inline]
2686    fn kind() -> SyntaxKind
2687    where
2688        Self: Sized,
2689    {
2690        ASM_EXPR
2691    }
2692    #[inline]
2693    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_EXPR }
2694    #[inline]
2695    fn cast(syntax: SyntaxNode) -> Option<Self> {
2696        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2697    }
2698    #[inline]
2699    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2700}
2701impl hash::Hash for AsmExpr {
2702    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2703}
2704impl Eq for AsmExpr {}
2705impl PartialEq for AsmExpr {
2706    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2707}
2708impl Clone for AsmExpr {
2709    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2710}
2711impl fmt::Debug for AsmExpr {
2712    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2713        f.debug_struct("AsmExpr").field("syntax", &self.syntax).finish()
2714    }
2715}
2716impl AstNode for AsmLabel {
2717    #[inline]
2718    fn kind() -> SyntaxKind
2719    where
2720        Self: Sized,
2721    {
2722        ASM_LABEL
2723    }
2724    #[inline]
2725    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_LABEL }
2726    #[inline]
2727    fn cast(syntax: SyntaxNode) -> Option<Self> {
2728        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2729    }
2730    #[inline]
2731    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2732}
2733impl hash::Hash for AsmLabel {
2734    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2735}
2736impl Eq for AsmLabel {}
2737impl PartialEq for AsmLabel {
2738    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2739}
2740impl Clone for AsmLabel {
2741    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2742}
2743impl fmt::Debug for AsmLabel {
2744    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2745        f.debug_struct("AsmLabel").field("syntax", &self.syntax).finish()
2746    }
2747}
2748impl AstNode for AsmOperandExpr {
2749    #[inline]
2750    fn kind() -> SyntaxKind
2751    where
2752        Self: Sized,
2753    {
2754        ASM_OPERAND_EXPR
2755    }
2756    #[inline]
2757    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPERAND_EXPR }
2758    #[inline]
2759    fn cast(syntax: SyntaxNode) -> Option<Self> {
2760        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2761    }
2762    #[inline]
2763    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2764}
2765impl hash::Hash for AsmOperandExpr {
2766    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2767}
2768impl Eq for AsmOperandExpr {}
2769impl PartialEq for AsmOperandExpr {
2770    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2771}
2772impl Clone for AsmOperandExpr {
2773    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2774}
2775impl fmt::Debug for AsmOperandExpr {
2776    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2777        f.debug_struct("AsmOperandExpr").field("syntax", &self.syntax).finish()
2778    }
2779}
2780impl AstNode for AsmOperandNamed {
2781    #[inline]
2782    fn kind() -> SyntaxKind
2783    where
2784        Self: Sized,
2785    {
2786        ASM_OPERAND_NAMED
2787    }
2788    #[inline]
2789    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPERAND_NAMED }
2790    #[inline]
2791    fn cast(syntax: SyntaxNode) -> Option<Self> {
2792        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2793    }
2794    #[inline]
2795    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2796}
2797impl hash::Hash for AsmOperandNamed {
2798    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2799}
2800impl Eq for AsmOperandNamed {}
2801impl PartialEq for AsmOperandNamed {
2802    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2803}
2804impl Clone for AsmOperandNamed {
2805    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2806}
2807impl fmt::Debug for AsmOperandNamed {
2808    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2809        f.debug_struct("AsmOperandNamed").field("syntax", &self.syntax).finish()
2810    }
2811}
2812impl AstNode for AsmOption {
2813    #[inline]
2814    fn kind() -> SyntaxKind
2815    where
2816        Self: Sized,
2817    {
2818        ASM_OPTION
2819    }
2820    #[inline]
2821    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPTION }
2822    #[inline]
2823    fn cast(syntax: SyntaxNode) -> Option<Self> {
2824        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2825    }
2826    #[inline]
2827    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2828}
2829impl hash::Hash for AsmOption {
2830    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2831}
2832impl Eq for AsmOption {}
2833impl PartialEq for AsmOption {
2834    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2835}
2836impl Clone for AsmOption {
2837    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2838}
2839impl fmt::Debug for AsmOption {
2840    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2841        f.debug_struct("AsmOption").field("syntax", &self.syntax).finish()
2842    }
2843}
2844impl AstNode for AsmOptions {
2845    #[inline]
2846    fn kind() -> SyntaxKind
2847    where
2848        Self: Sized,
2849    {
2850        ASM_OPTIONS
2851    }
2852    #[inline]
2853    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_OPTIONS }
2854    #[inline]
2855    fn cast(syntax: SyntaxNode) -> Option<Self> {
2856        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2857    }
2858    #[inline]
2859    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2860}
2861impl hash::Hash for AsmOptions {
2862    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2863}
2864impl Eq for AsmOptions {}
2865impl PartialEq for AsmOptions {
2866    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2867}
2868impl Clone for AsmOptions {
2869    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2870}
2871impl fmt::Debug for AsmOptions {
2872    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2873        f.debug_struct("AsmOptions").field("syntax", &self.syntax).finish()
2874    }
2875}
2876impl AstNode for AsmRegOperand {
2877    #[inline]
2878    fn kind() -> SyntaxKind
2879    where
2880        Self: Sized,
2881    {
2882        ASM_REG_OPERAND
2883    }
2884    #[inline]
2885    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_REG_OPERAND }
2886    #[inline]
2887    fn cast(syntax: SyntaxNode) -> Option<Self> {
2888        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2889    }
2890    #[inline]
2891    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2892}
2893impl hash::Hash for AsmRegOperand {
2894    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2895}
2896impl Eq for AsmRegOperand {}
2897impl PartialEq for AsmRegOperand {
2898    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2899}
2900impl Clone for AsmRegOperand {
2901    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2902}
2903impl fmt::Debug for AsmRegOperand {
2904    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2905        f.debug_struct("AsmRegOperand").field("syntax", &self.syntax).finish()
2906    }
2907}
2908impl AstNode for AsmRegSpec {
2909    #[inline]
2910    fn kind() -> SyntaxKind
2911    where
2912        Self: Sized,
2913    {
2914        ASM_REG_SPEC
2915    }
2916    #[inline]
2917    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_REG_SPEC }
2918    #[inline]
2919    fn cast(syntax: SyntaxNode) -> Option<Self> {
2920        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2921    }
2922    #[inline]
2923    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2924}
2925impl hash::Hash for AsmRegSpec {
2926    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2927}
2928impl Eq for AsmRegSpec {}
2929impl PartialEq for AsmRegSpec {
2930    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2931}
2932impl Clone for AsmRegSpec {
2933    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2934}
2935impl fmt::Debug for AsmRegSpec {
2936    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2937        f.debug_struct("AsmRegSpec").field("syntax", &self.syntax).finish()
2938    }
2939}
2940impl AstNode for AsmSym {
2941    #[inline]
2942    fn kind() -> SyntaxKind
2943    where
2944        Self: Sized,
2945    {
2946        ASM_SYM
2947    }
2948    #[inline]
2949    fn can_cast(kind: SyntaxKind) -> bool { kind == ASM_SYM }
2950    #[inline]
2951    fn cast(syntax: SyntaxNode) -> Option<Self> {
2952        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2953    }
2954    #[inline]
2955    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2956}
2957impl hash::Hash for AsmSym {
2958    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2959}
2960impl Eq for AsmSym {}
2961impl PartialEq for AsmSym {
2962    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2963}
2964impl Clone for AsmSym {
2965    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2966}
2967impl fmt::Debug for AsmSym {
2968    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2969        f.debug_struct("AsmSym").field("syntax", &self.syntax).finish()
2970    }
2971}
2972impl AstNode for AssocItemList {
2973    #[inline]
2974    fn kind() -> SyntaxKind
2975    where
2976        Self: Sized,
2977    {
2978        ASSOC_ITEM_LIST
2979    }
2980    #[inline]
2981    fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_ITEM_LIST }
2982    #[inline]
2983    fn cast(syntax: SyntaxNode) -> Option<Self> {
2984        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
2985    }
2986    #[inline]
2987    fn syntax(&self) -> &SyntaxNode { &self.syntax }
2988}
2989impl hash::Hash for AssocItemList {
2990    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
2991}
2992impl Eq for AssocItemList {}
2993impl PartialEq for AssocItemList {
2994    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
2995}
2996impl Clone for AssocItemList {
2997    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
2998}
2999impl fmt::Debug for AssocItemList {
3000    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3001        f.debug_struct("AssocItemList").field("syntax", &self.syntax).finish()
3002    }
3003}
3004impl AstNode for AssocTypeArg {
3005    #[inline]
3006    fn kind() -> SyntaxKind
3007    where
3008        Self: Sized,
3009    {
3010        ASSOC_TYPE_ARG
3011    }
3012    #[inline]
3013    fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_TYPE_ARG }
3014    #[inline]
3015    fn cast(syntax: SyntaxNode) -> Option<Self> {
3016        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3017    }
3018    #[inline]
3019    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3020}
3021impl hash::Hash for AssocTypeArg {
3022    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3023}
3024impl Eq for AssocTypeArg {}
3025impl PartialEq for AssocTypeArg {
3026    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3027}
3028impl Clone for AssocTypeArg {
3029    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3030}
3031impl fmt::Debug for AssocTypeArg {
3032    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3033        f.debug_struct("AssocTypeArg").field("syntax", &self.syntax).finish()
3034    }
3035}
3036impl AstNode for Attr {
3037    #[inline]
3038    fn kind() -> SyntaxKind
3039    where
3040        Self: Sized,
3041    {
3042        ATTR
3043    }
3044    #[inline]
3045    fn can_cast(kind: SyntaxKind) -> bool { kind == ATTR }
3046    #[inline]
3047    fn cast(syntax: SyntaxNode) -> Option<Self> {
3048        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3049    }
3050    #[inline]
3051    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3052}
3053impl hash::Hash for Attr {
3054    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3055}
3056impl Eq for Attr {}
3057impl PartialEq for Attr {
3058    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3059}
3060impl Clone for Attr {
3061    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3062}
3063impl fmt::Debug for Attr {
3064    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3065        f.debug_struct("Attr").field("syntax", &self.syntax).finish()
3066    }
3067}
3068impl AstNode for AwaitExpr {
3069    #[inline]
3070    fn kind() -> SyntaxKind
3071    where
3072        Self: Sized,
3073    {
3074        AWAIT_EXPR
3075    }
3076    #[inline]
3077    fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR }
3078    #[inline]
3079    fn cast(syntax: SyntaxNode) -> Option<Self> {
3080        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3081    }
3082    #[inline]
3083    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3084}
3085impl hash::Hash for AwaitExpr {
3086    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3087}
3088impl Eq for AwaitExpr {}
3089impl PartialEq for AwaitExpr {
3090    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3091}
3092impl Clone for AwaitExpr {
3093    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3094}
3095impl fmt::Debug for AwaitExpr {
3096    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3097        f.debug_struct("AwaitExpr").field("syntax", &self.syntax).finish()
3098    }
3099}
3100impl AstNode for BecomeExpr {
3101    #[inline]
3102    fn kind() -> SyntaxKind
3103    where
3104        Self: Sized,
3105    {
3106        BECOME_EXPR
3107    }
3108    #[inline]
3109    fn can_cast(kind: SyntaxKind) -> bool { kind == BECOME_EXPR }
3110    #[inline]
3111    fn cast(syntax: SyntaxNode) -> Option<Self> {
3112        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3113    }
3114    #[inline]
3115    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3116}
3117impl hash::Hash for BecomeExpr {
3118    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3119}
3120impl Eq for BecomeExpr {}
3121impl PartialEq for BecomeExpr {
3122    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3123}
3124impl Clone for BecomeExpr {
3125    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3126}
3127impl fmt::Debug for BecomeExpr {
3128    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3129        f.debug_struct("BecomeExpr").field("syntax", &self.syntax).finish()
3130    }
3131}
3132impl AstNode for BinExpr {
3133    #[inline]
3134    fn kind() -> SyntaxKind
3135    where
3136        Self: Sized,
3137    {
3138        BIN_EXPR
3139    }
3140    #[inline]
3141    fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR }
3142    #[inline]
3143    fn cast(syntax: SyntaxNode) -> Option<Self> {
3144        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3145    }
3146    #[inline]
3147    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3148}
3149impl hash::Hash for BinExpr {
3150    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3151}
3152impl Eq for BinExpr {}
3153impl PartialEq for BinExpr {
3154    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3155}
3156impl Clone for BinExpr {
3157    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3158}
3159impl fmt::Debug for BinExpr {
3160    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3161        f.debug_struct("BinExpr").field("syntax", &self.syntax).finish()
3162    }
3163}
3164impl AstNode for BlockExpr {
3165    #[inline]
3166    fn kind() -> SyntaxKind
3167    where
3168        Self: Sized,
3169    {
3170        BLOCK_EXPR
3171    }
3172    #[inline]
3173    fn can_cast(kind: SyntaxKind) -> bool { kind == BLOCK_EXPR }
3174    #[inline]
3175    fn cast(syntax: SyntaxNode) -> Option<Self> {
3176        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3177    }
3178    #[inline]
3179    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3180}
3181impl hash::Hash for BlockExpr {
3182    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3183}
3184impl Eq for BlockExpr {}
3185impl PartialEq for BlockExpr {
3186    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3187}
3188impl Clone for BlockExpr {
3189    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3190}
3191impl fmt::Debug for BlockExpr {
3192    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3193        f.debug_struct("BlockExpr").field("syntax", &self.syntax).finish()
3194    }
3195}
3196impl AstNode for BoxPat {
3197    #[inline]
3198    fn kind() -> SyntaxKind
3199    where
3200        Self: Sized,
3201    {
3202        BOX_PAT
3203    }
3204    #[inline]
3205    fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_PAT }
3206    #[inline]
3207    fn cast(syntax: SyntaxNode) -> Option<Self> {
3208        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3209    }
3210    #[inline]
3211    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3212}
3213impl hash::Hash for BoxPat {
3214    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3215}
3216impl Eq for BoxPat {}
3217impl PartialEq for BoxPat {
3218    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3219}
3220impl Clone for BoxPat {
3221    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3222}
3223impl fmt::Debug for BoxPat {
3224    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3225        f.debug_struct("BoxPat").field("syntax", &self.syntax).finish()
3226    }
3227}
3228impl AstNode for BreakExpr {
3229    #[inline]
3230    fn kind() -> SyntaxKind
3231    where
3232        Self: Sized,
3233    {
3234        BREAK_EXPR
3235    }
3236    #[inline]
3237    fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR }
3238    #[inline]
3239    fn cast(syntax: SyntaxNode) -> Option<Self> {
3240        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3241    }
3242    #[inline]
3243    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3244}
3245impl hash::Hash for BreakExpr {
3246    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3247}
3248impl Eq for BreakExpr {}
3249impl PartialEq for BreakExpr {
3250    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3251}
3252impl Clone for BreakExpr {
3253    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3254}
3255impl fmt::Debug for BreakExpr {
3256    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3257        f.debug_struct("BreakExpr").field("syntax", &self.syntax).finish()
3258    }
3259}
3260impl AstNode for CallExpr {
3261    #[inline]
3262    fn kind() -> SyntaxKind
3263    where
3264        Self: Sized,
3265    {
3266        CALL_EXPR
3267    }
3268    #[inline]
3269    fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR }
3270    #[inline]
3271    fn cast(syntax: SyntaxNode) -> Option<Self> {
3272        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3273    }
3274    #[inline]
3275    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3276}
3277impl hash::Hash for CallExpr {
3278    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3279}
3280impl Eq for CallExpr {}
3281impl PartialEq for CallExpr {
3282    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3283}
3284impl Clone for CallExpr {
3285    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3286}
3287impl fmt::Debug for CallExpr {
3288    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3289        f.debug_struct("CallExpr").field("syntax", &self.syntax).finish()
3290    }
3291}
3292impl AstNode for CastExpr {
3293    #[inline]
3294    fn kind() -> SyntaxKind
3295    where
3296        Self: Sized,
3297    {
3298        CAST_EXPR
3299    }
3300    #[inline]
3301    fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR }
3302    #[inline]
3303    fn cast(syntax: SyntaxNode) -> Option<Self> {
3304        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3305    }
3306    #[inline]
3307    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3308}
3309impl hash::Hash for CastExpr {
3310    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3311}
3312impl Eq for CastExpr {}
3313impl PartialEq for CastExpr {
3314    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3315}
3316impl Clone for CastExpr {
3317    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3318}
3319impl fmt::Debug for CastExpr {
3320    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3321        f.debug_struct("CastExpr").field("syntax", &self.syntax).finish()
3322    }
3323}
3324impl AstNode for CfgAtom {
3325    #[inline]
3326    fn kind() -> SyntaxKind
3327    where
3328        Self: Sized,
3329    {
3330        CFG_ATOM
3331    }
3332    #[inline]
3333    fn can_cast(kind: SyntaxKind) -> bool { kind == CFG_ATOM }
3334    #[inline]
3335    fn cast(syntax: SyntaxNode) -> Option<Self> {
3336        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3337    }
3338    #[inline]
3339    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3340}
3341impl hash::Hash for CfgAtom {
3342    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3343}
3344impl Eq for CfgAtom {}
3345impl PartialEq for CfgAtom {
3346    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3347}
3348impl Clone for CfgAtom {
3349    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3350}
3351impl fmt::Debug for CfgAtom {
3352    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3353        f.debug_struct("CfgAtom").field("syntax", &self.syntax).finish()
3354    }
3355}
3356impl AstNode for CfgAttrMeta {
3357    #[inline]
3358    fn kind() -> SyntaxKind
3359    where
3360        Self: Sized,
3361    {
3362        CFG_ATTR_META
3363    }
3364    #[inline]
3365    fn can_cast(kind: SyntaxKind) -> bool { kind == CFG_ATTR_META }
3366    #[inline]
3367    fn cast(syntax: SyntaxNode) -> Option<Self> {
3368        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3369    }
3370    #[inline]
3371    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3372}
3373impl hash::Hash for CfgAttrMeta {
3374    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3375}
3376impl Eq for CfgAttrMeta {}
3377impl PartialEq for CfgAttrMeta {
3378    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3379}
3380impl Clone for CfgAttrMeta {
3381    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3382}
3383impl fmt::Debug for CfgAttrMeta {
3384    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3385        f.debug_struct("CfgAttrMeta").field("syntax", &self.syntax).finish()
3386    }
3387}
3388impl AstNode for CfgComposite {
3389    #[inline]
3390    fn kind() -> SyntaxKind
3391    where
3392        Self: Sized,
3393    {
3394        CFG_COMPOSITE
3395    }
3396    #[inline]
3397    fn can_cast(kind: SyntaxKind) -> bool { kind == CFG_COMPOSITE }
3398    #[inline]
3399    fn cast(syntax: SyntaxNode) -> Option<Self> {
3400        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3401    }
3402    #[inline]
3403    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3404}
3405impl hash::Hash for CfgComposite {
3406    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3407}
3408impl Eq for CfgComposite {}
3409impl PartialEq for CfgComposite {
3410    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3411}
3412impl Clone for CfgComposite {
3413    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3414}
3415impl fmt::Debug for CfgComposite {
3416    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3417        f.debug_struct("CfgComposite").field("syntax", &self.syntax).finish()
3418    }
3419}
3420impl AstNode for CfgMeta {
3421    #[inline]
3422    fn kind() -> SyntaxKind
3423    where
3424        Self: Sized,
3425    {
3426        CFG_META
3427    }
3428    #[inline]
3429    fn can_cast(kind: SyntaxKind) -> bool { kind == CFG_META }
3430    #[inline]
3431    fn cast(syntax: SyntaxNode) -> Option<Self> {
3432        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3433    }
3434    #[inline]
3435    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3436}
3437impl hash::Hash for CfgMeta {
3438    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3439}
3440impl Eq for CfgMeta {}
3441impl PartialEq for CfgMeta {
3442    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3443}
3444impl Clone for CfgMeta {
3445    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3446}
3447impl fmt::Debug for CfgMeta {
3448    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3449        f.debug_struct("CfgMeta").field("syntax", &self.syntax).finish()
3450    }
3451}
3452impl AstNode for CfgPredExpr {
3453    #[inline]
3454    fn kind() -> SyntaxKind
3455    where
3456        Self: Sized,
3457    {
3458        CFG_PRED_EXPR
3459    }
3460    #[inline]
3461    fn can_cast(kind: SyntaxKind) -> bool { kind == CFG_PRED_EXPR }
3462    #[inline]
3463    fn cast(syntax: SyntaxNode) -> Option<Self> {
3464        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3465    }
3466    #[inline]
3467    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3468}
3469impl hash::Hash for CfgPredExpr {
3470    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3471}
3472impl Eq for CfgPredExpr {}
3473impl PartialEq for CfgPredExpr {
3474    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3475}
3476impl Clone for CfgPredExpr {
3477    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3478}
3479impl fmt::Debug for CfgPredExpr {
3480    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3481        f.debug_struct("CfgPredExpr").field("syntax", &self.syntax).finish()
3482    }
3483}
3484impl AstNode for CfgPredPat {
3485    #[inline]
3486    fn kind() -> SyntaxKind
3487    where
3488        Self: Sized,
3489    {
3490        CFG_PRED_PAT
3491    }
3492    #[inline]
3493    fn can_cast(kind: SyntaxKind) -> bool { kind == CFG_PRED_PAT }
3494    #[inline]
3495    fn cast(syntax: SyntaxNode) -> Option<Self> {
3496        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3497    }
3498    #[inline]
3499    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3500}
3501impl hash::Hash for CfgPredPat {
3502    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3503}
3504impl Eq for CfgPredPat {}
3505impl PartialEq for CfgPredPat {
3506    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3507}
3508impl Clone for CfgPredPat {
3509    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3510}
3511impl fmt::Debug for CfgPredPat {
3512    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3513        f.debug_struct("CfgPredPat").field("syntax", &self.syntax).finish()
3514    }
3515}
3516impl AstNode for ClosureExpr {
3517    #[inline]
3518    fn kind() -> SyntaxKind
3519    where
3520        Self: Sized,
3521    {
3522        CLOSURE_EXPR
3523    }
3524    #[inline]
3525    fn can_cast(kind: SyntaxKind) -> bool { kind == CLOSURE_EXPR }
3526    #[inline]
3527    fn cast(syntax: SyntaxNode) -> Option<Self> {
3528        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3529    }
3530    #[inline]
3531    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3532}
3533impl hash::Hash for ClosureExpr {
3534    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3535}
3536impl Eq for ClosureExpr {}
3537impl PartialEq for ClosureExpr {
3538    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3539}
3540impl Clone for ClosureExpr {
3541    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3542}
3543impl fmt::Debug for ClosureExpr {
3544    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3545        f.debug_struct("ClosureExpr").field("syntax", &self.syntax).finish()
3546    }
3547}
3548impl AstNode for Const {
3549    #[inline]
3550    fn kind() -> SyntaxKind
3551    where
3552        Self: Sized,
3553    {
3554        CONST
3555    }
3556    #[inline]
3557    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST }
3558    #[inline]
3559    fn cast(syntax: SyntaxNode) -> Option<Self> {
3560        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3561    }
3562    #[inline]
3563    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3564}
3565impl hash::Hash for Const {
3566    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3567}
3568impl Eq for Const {}
3569impl PartialEq for Const {
3570    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3571}
3572impl Clone for Const {
3573    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3574}
3575impl fmt::Debug for Const {
3576    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3577        f.debug_struct("Const").field("syntax", &self.syntax).finish()
3578    }
3579}
3580impl AstNode for ConstArg {
3581    #[inline]
3582    fn kind() -> SyntaxKind
3583    where
3584        Self: Sized,
3585    {
3586        CONST_ARG
3587    }
3588    #[inline]
3589    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_ARG }
3590    #[inline]
3591    fn cast(syntax: SyntaxNode) -> Option<Self> {
3592        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3593    }
3594    #[inline]
3595    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3596}
3597impl hash::Hash for ConstArg {
3598    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3599}
3600impl Eq for ConstArg {}
3601impl PartialEq for ConstArg {
3602    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3603}
3604impl Clone for ConstArg {
3605    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3606}
3607impl fmt::Debug for ConstArg {
3608    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3609        f.debug_struct("ConstArg").field("syntax", &self.syntax).finish()
3610    }
3611}
3612impl AstNode for ConstBlockPat {
3613    #[inline]
3614    fn kind() -> SyntaxKind
3615    where
3616        Self: Sized,
3617    {
3618        CONST_BLOCK_PAT
3619    }
3620    #[inline]
3621    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_BLOCK_PAT }
3622    #[inline]
3623    fn cast(syntax: SyntaxNode) -> Option<Self> {
3624        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3625    }
3626    #[inline]
3627    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3628}
3629impl hash::Hash for ConstBlockPat {
3630    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3631}
3632impl Eq for ConstBlockPat {}
3633impl PartialEq for ConstBlockPat {
3634    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3635}
3636impl Clone for ConstBlockPat {
3637    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3638}
3639impl fmt::Debug for ConstBlockPat {
3640    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3641        f.debug_struct("ConstBlockPat").field("syntax", &self.syntax).finish()
3642    }
3643}
3644impl AstNode for ConstParam {
3645    #[inline]
3646    fn kind() -> SyntaxKind
3647    where
3648        Self: Sized,
3649    {
3650        CONST_PARAM
3651    }
3652    #[inline]
3653    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM }
3654    #[inline]
3655    fn cast(syntax: SyntaxNode) -> Option<Self> {
3656        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3657    }
3658    #[inline]
3659    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3660}
3661impl hash::Hash for ConstParam {
3662    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3663}
3664impl Eq for ConstParam {}
3665impl PartialEq for ConstParam {
3666    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3667}
3668impl Clone for ConstParam {
3669    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3670}
3671impl fmt::Debug for ConstParam {
3672    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3673        f.debug_struct("ConstParam").field("syntax", &self.syntax).finish()
3674    }
3675}
3676impl AstNode for ContinueExpr {
3677    #[inline]
3678    fn kind() -> SyntaxKind
3679    where
3680        Self: Sized,
3681    {
3682        CONTINUE_EXPR
3683    }
3684    #[inline]
3685    fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR }
3686    #[inline]
3687    fn cast(syntax: SyntaxNode) -> Option<Self> {
3688        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3689    }
3690    #[inline]
3691    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3692}
3693impl hash::Hash for ContinueExpr {
3694    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3695}
3696impl Eq for ContinueExpr {}
3697impl PartialEq for ContinueExpr {
3698    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3699}
3700impl Clone for ContinueExpr {
3701    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3702}
3703impl fmt::Debug for ContinueExpr {
3704    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3705        f.debug_struct("ContinueExpr").field("syntax", &self.syntax).finish()
3706    }
3707}
3708impl AstNode for DerefPat {
3709    #[inline]
3710    fn kind() -> SyntaxKind
3711    where
3712        Self: Sized,
3713    {
3714        DEREF_PAT
3715    }
3716    #[inline]
3717    fn can_cast(kind: SyntaxKind) -> bool { kind == DEREF_PAT }
3718    #[inline]
3719    fn cast(syntax: SyntaxNode) -> Option<Self> {
3720        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3721    }
3722    #[inline]
3723    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3724}
3725impl hash::Hash for DerefPat {
3726    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3727}
3728impl Eq for DerefPat {}
3729impl PartialEq for DerefPat {
3730    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3731}
3732impl Clone for DerefPat {
3733    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3734}
3735impl fmt::Debug for DerefPat {
3736    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3737        f.debug_struct("DerefPat").field("syntax", &self.syntax).finish()
3738    }
3739}
3740impl AstNode for DocComment {
3741    #[inline]
3742    fn kind() -> SyntaxKind
3743    where
3744        Self: Sized,
3745    {
3746        DOC_COMMENT
3747    }
3748    #[inline]
3749    fn can_cast(kind: SyntaxKind) -> bool { kind == DOC_COMMENT }
3750    #[inline]
3751    fn cast(syntax: SyntaxNode) -> Option<Self> {
3752        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3753    }
3754    #[inline]
3755    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3756}
3757impl hash::Hash for DocComment {
3758    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3759}
3760impl Eq for DocComment {}
3761impl PartialEq for DocComment {
3762    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3763}
3764impl Clone for DocComment {
3765    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3766}
3767impl fmt::Debug for DocComment {
3768    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3769        f.debug_struct("DocComment").field("syntax", &self.syntax).finish()
3770    }
3771}
3772impl AstNode for DynTraitType {
3773    #[inline]
3774    fn kind() -> SyntaxKind
3775    where
3776        Self: Sized,
3777    {
3778        DYN_TRAIT_TYPE
3779    }
3780    #[inline]
3781    fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE }
3782    #[inline]
3783    fn cast(syntax: SyntaxNode) -> Option<Self> {
3784        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3785    }
3786    #[inline]
3787    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3788}
3789impl hash::Hash for DynTraitType {
3790    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3791}
3792impl Eq for DynTraitType {}
3793impl PartialEq for DynTraitType {
3794    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3795}
3796impl Clone for DynTraitType {
3797    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3798}
3799impl fmt::Debug for DynTraitType {
3800    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3801        f.debug_struct("DynTraitType").field("syntax", &self.syntax).finish()
3802    }
3803}
3804impl AstNode for Enum {
3805    #[inline]
3806    fn kind() -> SyntaxKind
3807    where
3808        Self: Sized,
3809    {
3810        ENUM
3811    }
3812    #[inline]
3813    fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM }
3814    #[inline]
3815    fn cast(syntax: SyntaxNode) -> Option<Self> {
3816        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3817    }
3818    #[inline]
3819    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3820}
3821impl hash::Hash for Enum {
3822    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3823}
3824impl Eq for Enum {}
3825impl PartialEq for Enum {
3826    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3827}
3828impl Clone for Enum {
3829    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3830}
3831impl fmt::Debug for Enum {
3832    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3833        f.debug_struct("Enum").field("syntax", &self.syntax).finish()
3834    }
3835}
3836impl AstNode for ExprStmt {
3837    #[inline]
3838    fn kind() -> SyntaxKind
3839    where
3840        Self: Sized,
3841    {
3842        EXPR_STMT
3843    }
3844    #[inline]
3845    fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
3846    #[inline]
3847    fn cast(syntax: SyntaxNode) -> Option<Self> {
3848        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3849    }
3850    #[inline]
3851    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3852}
3853impl hash::Hash for ExprStmt {
3854    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3855}
3856impl Eq for ExprStmt {}
3857impl PartialEq for ExprStmt {
3858    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3859}
3860impl Clone for ExprStmt {
3861    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3862}
3863impl fmt::Debug for ExprStmt {
3864    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3865        f.debug_struct("ExprStmt").field("syntax", &self.syntax).finish()
3866    }
3867}
3868impl AstNode for ExternBlock {
3869    #[inline]
3870    fn kind() -> SyntaxKind
3871    where
3872        Self: Sized,
3873    {
3874        EXTERN_BLOCK
3875    }
3876    #[inline]
3877    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_BLOCK }
3878    #[inline]
3879    fn cast(syntax: SyntaxNode) -> Option<Self> {
3880        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3881    }
3882    #[inline]
3883    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3884}
3885impl hash::Hash for ExternBlock {
3886    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3887}
3888impl Eq for ExternBlock {}
3889impl PartialEq for ExternBlock {
3890    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3891}
3892impl Clone for ExternBlock {
3893    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3894}
3895impl fmt::Debug for ExternBlock {
3896    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3897        f.debug_struct("ExternBlock").field("syntax", &self.syntax).finish()
3898    }
3899}
3900impl AstNode for ExternCrate {
3901    #[inline]
3902    fn kind() -> SyntaxKind
3903    where
3904        Self: Sized,
3905    {
3906        EXTERN_CRATE
3907    }
3908    #[inline]
3909    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_CRATE }
3910    #[inline]
3911    fn cast(syntax: SyntaxNode) -> Option<Self> {
3912        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3913    }
3914    #[inline]
3915    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3916}
3917impl hash::Hash for ExternCrate {
3918    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3919}
3920impl Eq for ExternCrate {}
3921impl PartialEq for ExternCrate {
3922    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3923}
3924impl Clone for ExternCrate {
3925    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3926}
3927impl fmt::Debug for ExternCrate {
3928    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3929        f.debug_struct("ExternCrate").field("syntax", &self.syntax).finish()
3930    }
3931}
3932impl AstNode for ExternItemList {
3933    #[inline]
3934    fn kind() -> SyntaxKind
3935    where
3936        Self: Sized,
3937    {
3938        EXTERN_ITEM_LIST
3939    }
3940    #[inline]
3941    fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST }
3942    #[inline]
3943    fn cast(syntax: SyntaxNode) -> Option<Self> {
3944        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3945    }
3946    #[inline]
3947    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3948}
3949impl hash::Hash for ExternItemList {
3950    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3951}
3952impl Eq for ExternItemList {}
3953impl PartialEq for ExternItemList {
3954    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3955}
3956impl Clone for ExternItemList {
3957    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3958}
3959impl fmt::Debug for ExternItemList {
3960    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3961        f.debug_struct("ExternItemList").field("syntax", &self.syntax).finish()
3962    }
3963}
3964impl AstNode for FieldExpr {
3965    #[inline]
3966    fn kind() -> SyntaxKind
3967    where
3968        Self: Sized,
3969    {
3970        FIELD_EXPR
3971    }
3972    #[inline]
3973    fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR }
3974    #[inline]
3975    fn cast(syntax: SyntaxNode) -> Option<Self> {
3976        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
3977    }
3978    #[inline]
3979    fn syntax(&self) -> &SyntaxNode { &self.syntax }
3980}
3981impl hash::Hash for FieldExpr {
3982    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
3983}
3984impl Eq for FieldExpr {}
3985impl PartialEq for FieldExpr {
3986    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
3987}
3988impl Clone for FieldExpr {
3989    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
3990}
3991impl fmt::Debug for FieldExpr {
3992    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3993        f.debug_struct("FieldExpr").field("syntax", &self.syntax).finish()
3994    }
3995}
3996impl AstNode for Fn {
3997    #[inline]
3998    fn kind() -> SyntaxKind
3999    where
4000        Self: Sized,
4001    {
4002        FN
4003    }
4004    #[inline]
4005    fn can_cast(kind: SyntaxKind) -> bool { kind == FN }
4006    #[inline]
4007    fn cast(syntax: SyntaxNode) -> Option<Self> {
4008        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4009    }
4010    #[inline]
4011    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4012}
4013impl hash::Hash for Fn {
4014    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4015}
4016impl Eq for Fn {}
4017impl PartialEq for Fn {
4018    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4019}
4020impl Clone for Fn {
4021    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4022}
4023impl fmt::Debug for Fn {
4024    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4025        f.debug_struct("Fn").field("syntax", &self.syntax).finish()
4026    }
4027}
4028impl AstNode for FnPtrType {
4029    #[inline]
4030    fn kind() -> SyntaxKind
4031    where
4032        Self: Sized,
4033    {
4034        FN_PTR_TYPE
4035    }
4036    #[inline]
4037    fn can_cast(kind: SyntaxKind) -> bool { kind == FN_PTR_TYPE }
4038    #[inline]
4039    fn cast(syntax: SyntaxNode) -> Option<Self> {
4040        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4041    }
4042    #[inline]
4043    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4044}
4045impl hash::Hash for FnPtrType {
4046    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4047}
4048impl Eq for FnPtrType {}
4049impl PartialEq for FnPtrType {
4050    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4051}
4052impl Clone for FnPtrType {
4053    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4054}
4055impl fmt::Debug for FnPtrType {
4056    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4057        f.debug_struct("FnPtrType").field("syntax", &self.syntax).finish()
4058    }
4059}
4060impl AstNode for ForBinder {
4061    #[inline]
4062    fn kind() -> SyntaxKind
4063    where
4064        Self: Sized,
4065    {
4066        FOR_BINDER
4067    }
4068    #[inline]
4069    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_BINDER }
4070    #[inline]
4071    fn cast(syntax: SyntaxNode) -> Option<Self> {
4072        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4073    }
4074    #[inline]
4075    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4076}
4077impl hash::Hash for ForBinder {
4078    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4079}
4080impl Eq for ForBinder {}
4081impl PartialEq for ForBinder {
4082    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4083}
4084impl Clone for ForBinder {
4085    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4086}
4087impl fmt::Debug for ForBinder {
4088    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4089        f.debug_struct("ForBinder").field("syntax", &self.syntax).finish()
4090    }
4091}
4092impl AstNode for ForExpr {
4093    #[inline]
4094    fn kind() -> SyntaxKind
4095    where
4096        Self: Sized,
4097    {
4098        FOR_EXPR
4099    }
4100    #[inline]
4101    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR }
4102    #[inline]
4103    fn cast(syntax: SyntaxNode) -> Option<Self> {
4104        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4105    }
4106    #[inline]
4107    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4108}
4109impl hash::Hash for ForExpr {
4110    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4111}
4112impl Eq for ForExpr {}
4113impl PartialEq for ForExpr {
4114    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4115}
4116impl Clone for ForExpr {
4117    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4118}
4119impl fmt::Debug for ForExpr {
4120    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4121        f.debug_struct("ForExpr").field("syntax", &self.syntax).finish()
4122    }
4123}
4124impl AstNode for ForType {
4125    #[inline]
4126    fn kind() -> SyntaxKind
4127    where
4128        Self: Sized,
4129    {
4130        FOR_TYPE
4131    }
4132    #[inline]
4133    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE }
4134    #[inline]
4135    fn cast(syntax: SyntaxNode) -> Option<Self> {
4136        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4137    }
4138    #[inline]
4139    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4140}
4141impl hash::Hash for ForType {
4142    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4143}
4144impl Eq for ForType {}
4145impl PartialEq for ForType {
4146    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4147}
4148impl Clone for ForType {
4149    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4150}
4151impl fmt::Debug for ForType {
4152    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4153        f.debug_struct("ForType").field("syntax", &self.syntax).finish()
4154    }
4155}
4156impl AstNode for FormatArgsArg {
4157    #[inline]
4158    fn kind() -> SyntaxKind
4159    where
4160        Self: Sized,
4161    {
4162        FORMAT_ARGS_ARG
4163    }
4164    #[inline]
4165    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_ARG }
4166    #[inline]
4167    fn cast(syntax: SyntaxNode) -> Option<Self> {
4168        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4169    }
4170    #[inline]
4171    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4172}
4173impl hash::Hash for FormatArgsArg {
4174    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4175}
4176impl Eq for FormatArgsArg {}
4177impl PartialEq for FormatArgsArg {
4178    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4179}
4180impl Clone for FormatArgsArg {
4181    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4182}
4183impl fmt::Debug for FormatArgsArg {
4184    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4185        f.debug_struct("FormatArgsArg").field("syntax", &self.syntax).finish()
4186    }
4187}
4188impl AstNode for FormatArgsExpr {
4189    #[inline]
4190    fn kind() -> SyntaxKind
4191    where
4192        Self: Sized,
4193    {
4194        FORMAT_ARGS_EXPR
4195    }
4196    #[inline]
4197    fn can_cast(kind: SyntaxKind) -> bool { kind == FORMAT_ARGS_EXPR }
4198    #[inline]
4199    fn cast(syntax: SyntaxNode) -> Option<Self> {
4200        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4201    }
4202    #[inline]
4203    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4204}
4205impl hash::Hash for FormatArgsExpr {
4206    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4207}
4208impl Eq for FormatArgsExpr {}
4209impl PartialEq for FormatArgsExpr {
4210    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4211}
4212impl Clone for FormatArgsExpr {
4213    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4214}
4215impl fmt::Debug for FormatArgsExpr {
4216    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4217        f.debug_struct("FormatArgsExpr").field("syntax", &self.syntax).finish()
4218    }
4219}
4220impl AstNode for GenericArgList {
4221    #[inline]
4222    fn kind() -> SyntaxKind
4223    where
4224        Self: Sized,
4225    {
4226        GENERIC_ARG_LIST
4227    }
4228    #[inline]
4229    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_ARG_LIST }
4230    #[inline]
4231    fn cast(syntax: SyntaxNode) -> Option<Self> {
4232        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4233    }
4234    #[inline]
4235    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4236}
4237impl hash::Hash for GenericArgList {
4238    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4239}
4240impl Eq for GenericArgList {}
4241impl PartialEq for GenericArgList {
4242    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4243}
4244impl Clone for GenericArgList {
4245    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4246}
4247impl fmt::Debug for GenericArgList {
4248    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4249        f.debug_struct("GenericArgList").field("syntax", &self.syntax).finish()
4250    }
4251}
4252impl AstNode for GenericParamList {
4253    #[inline]
4254    fn kind() -> SyntaxKind
4255    where
4256        Self: Sized,
4257    {
4258        GENERIC_PARAM_LIST
4259    }
4260    #[inline]
4261    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST }
4262    #[inline]
4263    fn cast(syntax: SyntaxNode) -> Option<Self> {
4264        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4265    }
4266    #[inline]
4267    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4268}
4269impl hash::Hash for GenericParamList {
4270    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4271}
4272impl Eq for GenericParamList {}
4273impl PartialEq for GenericParamList {
4274    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4275}
4276impl Clone for GenericParamList {
4277    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4278}
4279impl fmt::Debug for GenericParamList {
4280    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4281        f.debug_struct("GenericParamList").field("syntax", &self.syntax).finish()
4282    }
4283}
4284impl AstNode for IdentPat {
4285    #[inline]
4286    fn kind() -> SyntaxKind
4287    where
4288        Self: Sized,
4289    {
4290        IDENT_PAT
4291    }
4292    #[inline]
4293    fn can_cast(kind: SyntaxKind) -> bool { kind == IDENT_PAT }
4294    #[inline]
4295    fn cast(syntax: SyntaxNode) -> Option<Self> {
4296        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4297    }
4298    #[inline]
4299    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4300}
4301impl hash::Hash for IdentPat {
4302    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4303}
4304impl Eq for IdentPat {}
4305impl PartialEq for IdentPat {
4306    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4307}
4308impl Clone for IdentPat {
4309    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4310}
4311impl fmt::Debug for IdentPat {
4312    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4313        f.debug_struct("IdentPat").field("syntax", &self.syntax).finish()
4314    }
4315}
4316impl AstNode for IfExpr {
4317    #[inline]
4318    fn kind() -> SyntaxKind
4319    where
4320        Self: Sized,
4321    {
4322        IF_EXPR
4323    }
4324    #[inline]
4325    fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR }
4326    #[inline]
4327    fn cast(syntax: SyntaxNode) -> Option<Self> {
4328        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4329    }
4330    #[inline]
4331    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4332}
4333impl hash::Hash for IfExpr {
4334    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4335}
4336impl Eq for IfExpr {}
4337impl PartialEq for IfExpr {
4338    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4339}
4340impl Clone for IfExpr {
4341    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4342}
4343impl fmt::Debug for IfExpr {
4344    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4345        f.debug_struct("IfExpr").field("syntax", &self.syntax).finish()
4346    }
4347}
4348impl AstNode for Impl {
4349    #[inline]
4350    fn kind() -> SyntaxKind
4351    where
4352        Self: Sized,
4353    {
4354        IMPL
4355    }
4356    #[inline]
4357    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL }
4358    #[inline]
4359    fn cast(syntax: SyntaxNode) -> Option<Self> {
4360        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4361    }
4362    #[inline]
4363    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4364}
4365impl hash::Hash for Impl {
4366    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4367}
4368impl Eq for Impl {}
4369impl PartialEq for Impl {
4370    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4371}
4372impl Clone for Impl {
4373    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4374}
4375impl fmt::Debug for Impl {
4376    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4377        f.debug_struct("Impl").field("syntax", &self.syntax).finish()
4378    }
4379}
4380impl AstNode for ImplRestriction {
4381    #[inline]
4382    fn kind() -> SyntaxKind
4383    where
4384        Self: Sized,
4385    {
4386        IMPL_RESTRICTION
4387    }
4388    #[inline]
4389    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_RESTRICTION }
4390    #[inline]
4391    fn cast(syntax: SyntaxNode) -> Option<Self> {
4392        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4393    }
4394    #[inline]
4395    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4396}
4397impl hash::Hash for ImplRestriction {
4398    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4399}
4400impl Eq for ImplRestriction {}
4401impl PartialEq for ImplRestriction {
4402    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4403}
4404impl Clone for ImplRestriction {
4405    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4406}
4407impl fmt::Debug for ImplRestriction {
4408    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4409        f.debug_struct("ImplRestriction").field("syntax", &self.syntax).finish()
4410    }
4411}
4412impl AstNode for ImplTraitType {
4413    #[inline]
4414    fn kind() -> SyntaxKind
4415    where
4416        Self: Sized,
4417    {
4418        IMPL_TRAIT_TYPE
4419    }
4420    #[inline]
4421    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE }
4422    #[inline]
4423    fn cast(syntax: SyntaxNode) -> Option<Self> {
4424        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4425    }
4426    #[inline]
4427    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4428}
4429impl hash::Hash for ImplTraitType {
4430    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4431}
4432impl Eq for ImplTraitType {}
4433impl PartialEq for ImplTraitType {
4434    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4435}
4436impl Clone for ImplTraitType {
4437    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4438}
4439impl fmt::Debug for ImplTraitType {
4440    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4441        f.debug_struct("ImplTraitType").field("syntax", &self.syntax).finish()
4442    }
4443}
4444impl AstNode for IncludeBytesExpr {
4445    #[inline]
4446    fn kind() -> SyntaxKind
4447    where
4448        Self: Sized,
4449    {
4450        INCLUDE_BYTES_EXPR
4451    }
4452    #[inline]
4453    fn can_cast(kind: SyntaxKind) -> bool { kind == INCLUDE_BYTES_EXPR }
4454    #[inline]
4455    fn cast(syntax: SyntaxNode) -> Option<Self> {
4456        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4457    }
4458    #[inline]
4459    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4460}
4461impl hash::Hash for IncludeBytesExpr {
4462    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4463}
4464impl Eq for IncludeBytesExpr {}
4465impl PartialEq for IncludeBytesExpr {
4466    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4467}
4468impl Clone for IncludeBytesExpr {
4469    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4470}
4471impl fmt::Debug for IncludeBytesExpr {
4472    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4473        f.debug_struct("IncludeBytesExpr").field("syntax", &self.syntax).finish()
4474    }
4475}
4476impl AstNode for IndexExpr {
4477    #[inline]
4478    fn kind() -> SyntaxKind
4479    where
4480        Self: Sized,
4481    {
4482        INDEX_EXPR
4483    }
4484    #[inline]
4485    fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR }
4486    #[inline]
4487    fn cast(syntax: SyntaxNode) -> Option<Self> {
4488        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4489    }
4490    #[inline]
4491    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4492}
4493impl hash::Hash for IndexExpr {
4494    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4495}
4496impl Eq for IndexExpr {}
4497impl PartialEq for IndexExpr {
4498    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4499}
4500impl Clone for IndexExpr {
4501    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4502}
4503impl fmt::Debug for IndexExpr {
4504    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4505        f.debug_struct("IndexExpr").field("syntax", &self.syntax).finish()
4506    }
4507}
4508impl AstNode for InferType {
4509    #[inline]
4510    fn kind() -> SyntaxKind
4511    where
4512        Self: Sized,
4513    {
4514        INFER_TYPE
4515    }
4516    #[inline]
4517    fn can_cast(kind: SyntaxKind) -> bool { kind == INFER_TYPE }
4518    #[inline]
4519    fn cast(syntax: SyntaxNode) -> Option<Self> {
4520        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4521    }
4522    #[inline]
4523    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4524}
4525impl hash::Hash for InferType {
4526    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4527}
4528impl Eq for InferType {}
4529impl PartialEq for InferType {
4530    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4531}
4532impl Clone for InferType {
4533    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4534}
4535impl fmt::Debug for InferType {
4536    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4537        f.debug_struct("InferType").field("syntax", &self.syntax).finish()
4538    }
4539}
4540impl AstNode for ItemList {
4541    #[inline]
4542    fn kind() -> SyntaxKind
4543    where
4544        Self: Sized,
4545    {
4546        ITEM_LIST
4547    }
4548    #[inline]
4549    fn can_cast(kind: SyntaxKind) -> bool { kind == ITEM_LIST }
4550    #[inline]
4551    fn cast(syntax: SyntaxNode) -> Option<Self> {
4552        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4553    }
4554    #[inline]
4555    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4556}
4557impl hash::Hash for ItemList {
4558    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4559}
4560impl Eq for ItemList {}
4561impl PartialEq for ItemList {
4562    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4563}
4564impl Clone for ItemList {
4565    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4566}
4567impl fmt::Debug for ItemList {
4568    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4569        f.debug_struct("ItemList").field("syntax", &self.syntax).finish()
4570    }
4571}
4572impl AstNode for KeyValueMeta {
4573    #[inline]
4574    fn kind() -> SyntaxKind
4575    where
4576        Self: Sized,
4577    {
4578        KEY_VALUE_META
4579    }
4580    #[inline]
4581    fn can_cast(kind: SyntaxKind) -> bool { kind == KEY_VALUE_META }
4582    #[inline]
4583    fn cast(syntax: SyntaxNode) -> Option<Self> {
4584        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4585    }
4586    #[inline]
4587    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4588}
4589impl hash::Hash for KeyValueMeta {
4590    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4591}
4592impl Eq for KeyValueMeta {}
4593impl PartialEq for KeyValueMeta {
4594    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4595}
4596impl Clone for KeyValueMeta {
4597    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4598}
4599impl fmt::Debug for KeyValueMeta {
4600    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4601        f.debug_struct("KeyValueMeta").field("syntax", &self.syntax).finish()
4602    }
4603}
4604impl AstNode for Label {
4605    #[inline]
4606    fn kind() -> SyntaxKind
4607    where
4608        Self: Sized,
4609    {
4610        LABEL
4611    }
4612    #[inline]
4613    fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL }
4614    #[inline]
4615    fn cast(syntax: SyntaxNode) -> Option<Self> {
4616        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4617    }
4618    #[inline]
4619    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4620}
4621impl hash::Hash for Label {
4622    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4623}
4624impl Eq for Label {}
4625impl PartialEq for Label {
4626    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4627}
4628impl Clone for Label {
4629    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4630}
4631impl fmt::Debug for Label {
4632    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4633        f.debug_struct("Label").field("syntax", &self.syntax).finish()
4634    }
4635}
4636impl AstNode for LetElse {
4637    #[inline]
4638    fn kind() -> SyntaxKind
4639    where
4640        Self: Sized,
4641    {
4642        LET_ELSE
4643    }
4644    #[inline]
4645    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_ELSE }
4646    #[inline]
4647    fn cast(syntax: SyntaxNode) -> Option<Self> {
4648        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4649    }
4650    #[inline]
4651    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4652}
4653impl hash::Hash for LetElse {
4654    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4655}
4656impl Eq for LetElse {}
4657impl PartialEq for LetElse {
4658    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4659}
4660impl Clone for LetElse {
4661    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4662}
4663impl fmt::Debug for LetElse {
4664    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4665        f.debug_struct("LetElse").field("syntax", &self.syntax).finish()
4666    }
4667}
4668impl AstNode for LetExpr {
4669    #[inline]
4670    fn kind() -> SyntaxKind
4671    where
4672        Self: Sized,
4673    {
4674        LET_EXPR
4675    }
4676    #[inline]
4677    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_EXPR }
4678    #[inline]
4679    fn cast(syntax: SyntaxNode) -> Option<Self> {
4680        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4681    }
4682    #[inline]
4683    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4684}
4685impl hash::Hash for LetExpr {
4686    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4687}
4688impl Eq for LetExpr {}
4689impl PartialEq for LetExpr {
4690    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4691}
4692impl Clone for LetExpr {
4693    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4694}
4695impl fmt::Debug for LetExpr {
4696    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4697        f.debug_struct("LetExpr").field("syntax", &self.syntax).finish()
4698    }
4699}
4700impl AstNode for LetStmt {
4701    #[inline]
4702    fn kind() -> SyntaxKind
4703    where
4704        Self: Sized,
4705    {
4706        LET_STMT
4707    }
4708    #[inline]
4709    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT }
4710    #[inline]
4711    fn cast(syntax: SyntaxNode) -> Option<Self> {
4712        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4713    }
4714    #[inline]
4715    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4716}
4717impl hash::Hash for LetStmt {
4718    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4719}
4720impl Eq for LetStmt {}
4721impl PartialEq for LetStmt {
4722    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4723}
4724impl Clone for LetStmt {
4725    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4726}
4727impl fmt::Debug for LetStmt {
4728    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4729        f.debug_struct("LetStmt").field("syntax", &self.syntax).finish()
4730    }
4731}
4732impl AstNode for Lifetime {
4733    #[inline]
4734    fn kind() -> SyntaxKind
4735    where
4736        Self: Sized,
4737    {
4738        LIFETIME
4739    }
4740    #[inline]
4741    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME }
4742    #[inline]
4743    fn cast(syntax: SyntaxNode) -> Option<Self> {
4744        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4745    }
4746    #[inline]
4747    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4748}
4749impl hash::Hash for Lifetime {
4750    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4751}
4752impl Eq for Lifetime {}
4753impl PartialEq for Lifetime {
4754    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4755}
4756impl Clone for Lifetime {
4757    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4758}
4759impl fmt::Debug for Lifetime {
4760    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4761        f.debug_struct("Lifetime").field("syntax", &self.syntax).finish()
4762    }
4763}
4764impl AstNode for LifetimeArg {
4765    #[inline]
4766    fn kind() -> SyntaxKind
4767    where
4768        Self: Sized,
4769    {
4770        LIFETIME_ARG
4771    }
4772    #[inline]
4773    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_ARG }
4774    #[inline]
4775    fn cast(syntax: SyntaxNode) -> Option<Self> {
4776        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4777    }
4778    #[inline]
4779    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4780}
4781impl hash::Hash for LifetimeArg {
4782    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4783}
4784impl Eq for LifetimeArg {}
4785impl PartialEq for LifetimeArg {
4786    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4787}
4788impl Clone for LifetimeArg {
4789    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4790}
4791impl fmt::Debug for LifetimeArg {
4792    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4793        f.debug_struct("LifetimeArg").field("syntax", &self.syntax).finish()
4794    }
4795}
4796impl AstNode for LifetimeParam {
4797    #[inline]
4798    fn kind() -> SyntaxKind
4799    where
4800        Self: Sized,
4801    {
4802        LIFETIME_PARAM
4803    }
4804    #[inline]
4805    fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM }
4806    #[inline]
4807    fn cast(syntax: SyntaxNode) -> Option<Self> {
4808        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4809    }
4810    #[inline]
4811    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4812}
4813impl hash::Hash for LifetimeParam {
4814    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4815}
4816impl Eq for LifetimeParam {}
4817impl PartialEq for LifetimeParam {
4818    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4819}
4820impl Clone for LifetimeParam {
4821    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4822}
4823impl fmt::Debug for LifetimeParam {
4824    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4825        f.debug_struct("LifetimeParam").field("syntax", &self.syntax).finish()
4826    }
4827}
4828impl AstNode for Literal {
4829    #[inline]
4830    fn kind() -> SyntaxKind
4831    where
4832        Self: Sized,
4833    {
4834        LITERAL
4835    }
4836    #[inline]
4837    fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL }
4838    #[inline]
4839    fn cast(syntax: SyntaxNode) -> Option<Self> {
4840        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4841    }
4842    #[inline]
4843    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4844}
4845impl hash::Hash for Literal {
4846    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4847}
4848impl Eq for Literal {}
4849impl PartialEq for Literal {
4850    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4851}
4852impl Clone for Literal {
4853    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4854}
4855impl fmt::Debug for Literal {
4856    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4857        f.debug_struct("Literal").field("syntax", &self.syntax).finish()
4858    }
4859}
4860impl AstNode for LiteralPat {
4861    #[inline]
4862    fn kind() -> SyntaxKind
4863    where
4864        Self: Sized,
4865    {
4866        LITERAL_PAT
4867    }
4868    #[inline]
4869    fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL_PAT }
4870    #[inline]
4871    fn cast(syntax: SyntaxNode) -> Option<Self> {
4872        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4873    }
4874    #[inline]
4875    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4876}
4877impl hash::Hash for LiteralPat {
4878    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4879}
4880impl Eq for LiteralPat {}
4881impl PartialEq for LiteralPat {
4882    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4883}
4884impl Clone for LiteralPat {
4885    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4886}
4887impl fmt::Debug for LiteralPat {
4888    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4889        f.debug_struct("LiteralPat").field("syntax", &self.syntax).finish()
4890    }
4891}
4892impl AstNode for LoopExpr {
4893    #[inline]
4894    fn kind() -> SyntaxKind
4895    where
4896        Self: Sized,
4897    {
4898        LOOP_EXPR
4899    }
4900    #[inline]
4901    fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR }
4902    #[inline]
4903    fn cast(syntax: SyntaxNode) -> Option<Self> {
4904        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4905    }
4906    #[inline]
4907    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4908}
4909impl hash::Hash for LoopExpr {
4910    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4911}
4912impl Eq for LoopExpr {}
4913impl PartialEq for LoopExpr {
4914    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4915}
4916impl Clone for LoopExpr {
4917    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4918}
4919impl fmt::Debug for LoopExpr {
4920    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4921        f.debug_struct("LoopExpr").field("syntax", &self.syntax).finish()
4922    }
4923}
4924impl AstNode for MacroCall {
4925    #[inline]
4926    fn kind() -> SyntaxKind
4927    where
4928        Self: Sized,
4929    {
4930        MACRO_CALL
4931    }
4932    #[inline]
4933    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_CALL }
4934    #[inline]
4935    fn cast(syntax: SyntaxNode) -> Option<Self> {
4936        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4937    }
4938    #[inline]
4939    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4940}
4941impl hash::Hash for MacroCall {
4942    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4943}
4944impl Eq for MacroCall {}
4945impl PartialEq for MacroCall {
4946    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4947}
4948impl Clone for MacroCall {
4949    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4950}
4951impl fmt::Debug for MacroCall {
4952    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4953        f.debug_struct("MacroCall").field("syntax", &self.syntax).finish()
4954    }
4955}
4956impl AstNode for MacroDef {
4957    #[inline]
4958    fn kind() -> SyntaxKind
4959    where
4960        Self: Sized,
4961    {
4962        MACRO_DEF
4963    }
4964    #[inline]
4965    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF }
4966    #[inline]
4967    fn cast(syntax: SyntaxNode) -> Option<Self> {
4968        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
4969    }
4970    #[inline]
4971    fn syntax(&self) -> &SyntaxNode { &self.syntax }
4972}
4973impl hash::Hash for MacroDef {
4974    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
4975}
4976impl Eq for MacroDef {}
4977impl PartialEq for MacroDef {
4978    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
4979}
4980impl Clone for MacroDef {
4981    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
4982}
4983impl fmt::Debug for MacroDef {
4984    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4985        f.debug_struct("MacroDef").field("syntax", &self.syntax).finish()
4986    }
4987}
4988impl AstNode for MacroExpr {
4989    #[inline]
4990    fn kind() -> SyntaxKind
4991    where
4992        Self: Sized,
4993    {
4994        MACRO_EXPR
4995    }
4996    #[inline]
4997    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_EXPR }
4998    #[inline]
4999    fn cast(syntax: SyntaxNode) -> Option<Self> {
5000        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5001    }
5002    #[inline]
5003    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5004}
5005impl hash::Hash for MacroExpr {
5006    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5007}
5008impl Eq for MacroExpr {}
5009impl PartialEq for MacroExpr {
5010    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5011}
5012impl Clone for MacroExpr {
5013    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5014}
5015impl fmt::Debug for MacroExpr {
5016    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5017        f.debug_struct("MacroExpr").field("syntax", &self.syntax).finish()
5018    }
5019}
5020impl AstNode for MacroItems {
5021    #[inline]
5022    fn kind() -> SyntaxKind
5023    where
5024        Self: Sized,
5025    {
5026        MACRO_ITEMS
5027    }
5028    #[inline]
5029    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
5030    #[inline]
5031    fn cast(syntax: SyntaxNode) -> Option<Self> {
5032        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5033    }
5034    #[inline]
5035    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5036}
5037impl hash::Hash for MacroItems {
5038    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5039}
5040impl Eq for MacroItems {}
5041impl PartialEq for MacroItems {
5042    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5043}
5044impl Clone for MacroItems {
5045    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5046}
5047impl fmt::Debug for MacroItems {
5048    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5049        f.debug_struct("MacroItems").field("syntax", &self.syntax).finish()
5050    }
5051}
5052impl AstNode for MacroPat {
5053    #[inline]
5054    fn kind() -> SyntaxKind
5055    where
5056        Self: Sized,
5057    {
5058        MACRO_PAT
5059    }
5060    #[inline]
5061    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_PAT }
5062    #[inline]
5063    fn cast(syntax: SyntaxNode) -> Option<Self> {
5064        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5065    }
5066    #[inline]
5067    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5068}
5069impl hash::Hash for MacroPat {
5070    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5071}
5072impl Eq for MacroPat {}
5073impl PartialEq for MacroPat {
5074    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5075}
5076impl Clone for MacroPat {
5077    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5078}
5079impl fmt::Debug for MacroPat {
5080    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5081        f.debug_struct("MacroPat").field("syntax", &self.syntax).finish()
5082    }
5083}
5084impl AstNode for MacroRules {
5085    #[inline]
5086    fn kind() -> SyntaxKind
5087    where
5088        Self: Sized,
5089    {
5090        MACRO_RULES
5091    }
5092    #[inline]
5093    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_RULES }
5094    #[inline]
5095    fn cast(syntax: SyntaxNode) -> Option<Self> {
5096        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5097    }
5098    #[inline]
5099    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5100}
5101impl hash::Hash for MacroRules {
5102    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5103}
5104impl Eq for MacroRules {}
5105impl PartialEq for MacroRules {
5106    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5107}
5108impl Clone for MacroRules {
5109    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5110}
5111impl fmt::Debug for MacroRules {
5112    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5113        f.debug_struct("MacroRules").field("syntax", &self.syntax).finish()
5114    }
5115}
5116impl AstNode for MacroStmts {
5117    #[inline]
5118    fn kind() -> SyntaxKind
5119    where
5120        Self: Sized,
5121    {
5122        MACRO_STMTS
5123    }
5124    #[inline]
5125    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_STMTS }
5126    #[inline]
5127    fn cast(syntax: SyntaxNode) -> Option<Self> {
5128        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5129    }
5130    #[inline]
5131    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5132}
5133impl hash::Hash for MacroStmts {
5134    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5135}
5136impl Eq for MacroStmts {}
5137impl PartialEq for MacroStmts {
5138    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5139}
5140impl Clone for MacroStmts {
5141    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5142}
5143impl fmt::Debug for MacroStmts {
5144    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5145        f.debug_struct("MacroStmts").field("syntax", &self.syntax).finish()
5146    }
5147}
5148impl AstNode for MacroType {
5149    #[inline]
5150    fn kind() -> SyntaxKind
5151    where
5152        Self: Sized,
5153    {
5154        MACRO_TYPE
5155    }
5156    #[inline]
5157    fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_TYPE }
5158    #[inline]
5159    fn cast(syntax: SyntaxNode) -> Option<Self> {
5160        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5161    }
5162    #[inline]
5163    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5164}
5165impl hash::Hash for MacroType {
5166    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5167}
5168impl Eq for MacroType {}
5169impl PartialEq for MacroType {
5170    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5171}
5172impl Clone for MacroType {
5173    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5174}
5175impl fmt::Debug for MacroType {
5176    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5177        f.debug_struct("MacroType").field("syntax", &self.syntax).finish()
5178    }
5179}
5180impl AstNode for MatchArm {
5181    #[inline]
5182    fn kind() -> SyntaxKind
5183    where
5184        Self: Sized,
5185    {
5186        MATCH_ARM
5187    }
5188    #[inline]
5189    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM }
5190    #[inline]
5191    fn cast(syntax: SyntaxNode) -> Option<Self> {
5192        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5193    }
5194    #[inline]
5195    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5196}
5197impl hash::Hash for MatchArm {
5198    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5199}
5200impl Eq for MatchArm {}
5201impl PartialEq for MatchArm {
5202    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5203}
5204impl Clone for MatchArm {
5205    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5206}
5207impl fmt::Debug for MatchArm {
5208    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5209        f.debug_struct("MatchArm").field("syntax", &self.syntax).finish()
5210    }
5211}
5212impl AstNode for MatchArmList {
5213    #[inline]
5214    fn kind() -> SyntaxKind
5215    where
5216        Self: Sized,
5217    {
5218        MATCH_ARM_LIST
5219    }
5220    #[inline]
5221    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST }
5222    #[inline]
5223    fn cast(syntax: SyntaxNode) -> Option<Self> {
5224        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5225    }
5226    #[inline]
5227    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5228}
5229impl hash::Hash for MatchArmList {
5230    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5231}
5232impl Eq for MatchArmList {}
5233impl PartialEq for MatchArmList {
5234    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5235}
5236impl Clone for MatchArmList {
5237    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5238}
5239impl fmt::Debug for MatchArmList {
5240    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5241        f.debug_struct("MatchArmList").field("syntax", &self.syntax).finish()
5242    }
5243}
5244impl AstNode for MatchExpr {
5245    #[inline]
5246    fn kind() -> SyntaxKind
5247    where
5248        Self: Sized,
5249    {
5250        MATCH_EXPR
5251    }
5252    #[inline]
5253    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR }
5254    #[inline]
5255    fn cast(syntax: SyntaxNode) -> Option<Self> {
5256        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5257    }
5258    #[inline]
5259    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5260}
5261impl hash::Hash for MatchExpr {
5262    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5263}
5264impl Eq for MatchExpr {}
5265impl PartialEq for MatchExpr {
5266    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5267}
5268impl Clone for MatchExpr {
5269    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5270}
5271impl fmt::Debug for MatchExpr {
5272    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5273        f.debug_struct("MatchExpr").field("syntax", &self.syntax).finish()
5274    }
5275}
5276impl AstNode for MatchGuard {
5277    #[inline]
5278    fn kind() -> SyntaxKind
5279    where
5280        Self: Sized,
5281    {
5282        MATCH_GUARD
5283    }
5284    #[inline]
5285    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD }
5286    #[inline]
5287    fn cast(syntax: SyntaxNode) -> Option<Self> {
5288        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5289    }
5290    #[inline]
5291    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5292}
5293impl hash::Hash for MatchGuard {
5294    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5295}
5296impl Eq for MatchGuard {}
5297impl PartialEq for MatchGuard {
5298    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5299}
5300impl Clone for MatchGuard {
5301    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5302}
5303impl fmt::Debug for MatchGuard {
5304    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5305        f.debug_struct("MatchGuard").field("syntax", &self.syntax).finish()
5306    }
5307}
5308impl AstNode for MethodCallExpr {
5309    #[inline]
5310    fn kind() -> SyntaxKind
5311    where
5312        Self: Sized,
5313    {
5314        METHOD_CALL_EXPR
5315    }
5316    #[inline]
5317    fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR }
5318    #[inline]
5319    fn cast(syntax: SyntaxNode) -> Option<Self> {
5320        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5321    }
5322    #[inline]
5323    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5324}
5325impl hash::Hash for MethodCallExpr {
5326    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5327}
5328impl Eq for MethodCallExpr {}
5329impl PartialEq for MethodCallExpr {
5330    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5331}
5332impl Clone for MethodCallExpr {
5333    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5334}
5335impl fmt::Debug for MethodCallExpr {
5336    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5337        f.debug_struct("MethodCallExpr").field("syntax", &self.syntax).finish()
5338    }
5339}
5340impl AstNode for Module {
5341    #[inline]
5342    fn kind() -> SyntaxKind
5343    where
5344        Self: Sized,
5345    {
5346        MODULE
5347    }
5348    #[inline]
5349    fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE }
5350    #[inline]
5351    fn cast(syntax: SyntaxNode) -> Option<Self> {
5352        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5353    }
5354    #[inline]
5355    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5356}
5357impl hash::Hash for Module {
5358    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5359}
5360impl Eq for Module {}
5361impl PartialEq for Module {
5362    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5363}
5364impl Clone for Module {
5365    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5366}
5367impl fmt::Debug for Module {
5368    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5369        f.debug_struct("Module").field("syntax", &self.syntax).finish()
5370    }
5371}
5372impl AstNode for MutRestriction {
5373    #[inline]
5374    fn kind() -> SyntaxKind
5375    where
5376        Self: Sized,
5377    {
5378        MUT_RESTRICTION
5379    }
5380    #[inline]
5381    fn can_cast(kind: SyntaxKind) -> bool { kind == MUT_RESTRICTION }
5382    #[inline]
5383    fn cast(syntax: SyntaxNode) -> Option<Self> {
5384        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5385    }
5386    #[inline]
5387    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5388}
5389impl hash::Hash for MutRestriction {
5390    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5391}
5392impl Eq for MutRestriction {}
5393impl PartialEq for MutRestriction {
5394    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5395}
5396impl Clone for MutRestriction {
5397    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5398}
5399impl fmt::Debug for MutRestriction {
5400    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5401        f.debug_struct("MutRestriction").field("syntax", &self.syntax).finish()
5402    }
5403}
5404impl AstNode for Name {
5405    #[inline]
5406    fn kind() -> SyntaxKind
5407    where
5408        Self: Sized,
5409    {
5410        NAME
5411    }
5412    #[inline]
5413    fn can_cast(kind: SyntaxKind) -> bool { kind == NAME }
5414    #[inline]
5415    fn cast(syntax: SyntaxNode) -> Option<Self> {
5416        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5417    }
5418    #[inline]
5419    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5420}
5421impl hash::Hash for Name {
5422    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5423}
5424impl Eq for Name {}
5425impl PartialEq for Name {
5426    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5427}
5428impl Clone for Name {
5429    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5430}
5431impl fmt::Debug for Name {
5432    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5433        f.debug_struct("Name").field("syntax", &self.syntax).finish()
5434    }
5435}
5436impl AstNode for NameRef {
5437    #[inline]
5438    fn kind() -> SyntaxKind
5439    where
5440        Self: Sized,
5441    {
5442        NAME_REF
5443    }
5444    #[inline]
5445    fn can_cast(kind: SyntaxKind) -> bool { kind == NAME_REF }
5446    #[inline]
5447    fn cast(syntax: SyntaxNode) -> Option<Self> {
5448        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5449    }
5450    #[inline]
5451    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5452}
5453impl hash::Hash for NameRef {
5454    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5455}
5456impl Eq for NameRef {}
5457impl PartialEq for NameRef {
5458    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5459}
5460impl Clone for NameRef {
5461    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5462}
5463impl fmt::Debug for NameRef {
5464    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5465        f.debug_struct("NameRef").field("syntax", &self.syntax).finish()
5466    }
5467}
5468impl AstNode for NeverType {
5469    #[inline]
5470    fn kind() -> SyntaxKind
5471    where
5472        Self: Sized,
5473    {
5474        NEVER_TYPE
5475    }
5476    #[inline]
5477    fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE }
5478    #[inline]
5479    fn cast(syntax: SyntaxNode) -> Option<Self> {
5480        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5481    }
5482    #[inline]
5483    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5484}
5485impl hash::Hash for NeverType {
5486    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5487}
5488impl Eq for NeverType {}
5489impl PartialEq for NeverType {
5490    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5491}
5492impl Clone for NeverType {
5493    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5494}
5495impl fmt::Debug for NeverType {
5496    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5497        f.debug_struct("NeverType").field("syntax", &self.syntax).finish()
5498    }
5499}
5500impl AstNode for NotNull {
5501    #[inline]
5502    fn kind() -> SyntaxKind
5503    where
5504        Self: Sized,
5505    {
5506        NOT_NULL
5507    }
5508    #[inline]
5509    fn can_cast(kind: SyntaxKind) -> bool { kind == NOT_NULL }
5510    #[inline]
5511    fn cast(syntax: SyntaxNode) -> Option<Self> {
5512        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5513    }
5514    #[inline]
5515    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5516}
5517impl hash::Hash for NotNull {
5518    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5519}
5520impl Eq for NotNull {}
5521impl PartialEq for NotNull {
5522    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5523}
5524impl Clone for NotNull {
5525    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5526}
5527impl fmt::Debug for NotNull {
5528    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5529        f.debug_struct("NotNull").field("syntax", &self.syntax).finish()
5530    }
5531}
5532impl AstNode for OffsetOfExpr {
5533    #[inline]
5534    fn kind() -> SyntaxKind
5535    where
5536        Self: Sized,
5537    {
5538        OFFSET_OF_EXPR
5539    }
5540    #[inline]
5541    fn can_cast(kind: SyntaxKind) -> bool { kind == OFFSET_OF_EXPR }
5542    #[inline]
5543    fn cast(syntax: SyntaxNode) -> Option<Self> {
5544        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5545    }
5546    #[inline]
5547    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5548}
5549impl hash::Hash for OffsetOfExpr {
5550    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5551}
5552impl Eq for OffsetOfExpr {}
5553impl PartialEq for OffsetOfExpr {
5554    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5555}
5556impl Clone for OffsetOfExpr {
5557    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5558}
5559impl fmt::Debug for OffsetOfExpr {
5560    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5561        f.debug_struct("OffsetOfExpr").field("syntax", &self.syntax).finish()
5562    }
5563}
5564impl AstNode for OrPat {
5565    #[inline]
5566    fn kind() -> SyntaxKind
5567    where
5568        Self: Sized,
5569    {
5570        OR_PAT
5571    }
5572    #[inline]
5573    fn can_cast(kind: SyntaxKind) -> bool { kind == OR_PAT }
5574    #[inline]
5575    fn cast(syntax: SyntaxNode) -> Option<Self> {
5576        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5577    }
5578    #[inline]
5579    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5580}
5581impl hash::Hash for OrPat {
5582    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5583}
5584impl Eq for OrPat {}
5585impl PartialEq for OrPat {
5586    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5587}
5588impl Clone for OrPat {
5589    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5590}
5591impl fmt::Debug for OrPat {
5592    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5593        f.debug_struct("OrPat").field("syntax", &self.syntax).finish()
5594    }
5595}
5596impl AstNode for Param {
5597    #[inline]
5598    fn kind() -> SyntaxKind
5599    where
5600        Self: Sized,
5601    {
5602        PARAM
5603    }
5604    #[inline]
5605    fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM }
5606    #[inline]
5607    fn cast(syntax: SyntaxNode) -> Option<Self> {
5608        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5609    }
5610    #[inline]
5611    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5612}
5613impl hash::Hash for Param {
5614    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5615}
5616impl Eq for Param {}
5617impl PartialEq for Param {
5618    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5619}
5620impl Clone for Param {
5621    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5622}
5623impl fmt::Debug for Param {
5624    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5625        f.debug_struct("Param").field("syntax", &self.syntax).finish()
5626    }
5627}
5628impl AstNode for ParamList {
5629    #[inline]
5630    fn kind() -> SyntaxKind
5631    where
5632        Self: Sized,
5633    {
5634        PARAM_LIST
5635    }
5636    #[inline]
5637    fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM_LIST }
5638    #[inline]
5639    fn cast(syntax: SyntaxNode) -> Option<Self> {
5640        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5641    }
5642    #[inline]
5643    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5644}
5645impl hash::Hash for ParamList {
5646    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5647}
5648impl Eq for ParamList {}
5649impl PartialEq for ParamList {
5650    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5651}
5652impl Clone for ParamList {
5653    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5654}
5655impl fmt::Debug for ParamList {
5656    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5657        f.debug_struct("ParamList").field("syntax", &self.syntax).finish()
5658    }
5659}
5660impl AstNode for ParenExpr {
5661    #[inline]
5662    fn kind() -> SyntaxKind
5663    where
5664        Self: Sized,
5665    {
5666        PAREN_EXPR
5667    }
5668    #[inline]
5669    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR }
5670    #[inline]
5671    fn cast(syntax: SyntaxNode) -> Option<Self> {
5672        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5673    }
5674    #[inline]
5675    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5676}
5677impl hash::Hash for ParenExpr {
5678    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5679}
5680impl Eq for ParenExpr {}
5681impl PartialEq for ParenExpr {
5682    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5683}
5684impl Clone for ParenExpr {
5685    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5686}
5687impl fmt::Debug for ParenExpr {
5688    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5689        f.debug_struct("ParenExpr").field("syntax", &self.syntax).finish()
5690    }
5691}
5692impl AstNode for ParenPat {
5693    #[inline]
5694    fn kind() -> SyntaxKind
5695    where
5696        Self: Sized,
5697    {
5698        PAREN_PAT
5699    }
5700    #[inline]
5701    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_PAT }
5702    #[inline]
5703    fn cast(syntax: SyntaxNode) -> Option<Self> {
5704        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5705    }
5706    #[inline]
5707    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5708}
5709impl hash::Hash for ParenPat {
5710    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5711}
5712impl Eq for ParenPat {}
5713impl PartialEq for ParenPat {
5714    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5715}
5716impl Clone for ParenPat {
5717    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5718}
5719impl fmt::Debug for ParenPat {
5720    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5721        f.debug_struct("ParenPat").field("syntax", &self.syntax).finish()
5722    }
5723}
5724impl AstNode for ParenType {
5725    #[inline]
5726    fn kind() -> SyntaxKind
5727    where
5728        Self: Sized,
5729    {
5730        PAREN_TYPE
5731    }
5732    #[inline]
5733    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE }
5734    #[inline]
5735    fn cast(syntax: SyntaxNode) -> Option<Self> {
5736        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5737    }
5738    #[inline]
5739    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5740}
5741impl hash::Hash for ParenType {
5742    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5743}
5744impl Eq for ParenType {}
5745impl PartialEq for ParenType {
5746    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5747}
5748impl Clone for ParenType {
5749    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5750}
5751impl fmt::Debug for ParenType {
5752    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5753        f.debug_struct("ParenType").field("syntax", &self.syntax).finish()
5754    }
5755}
5756impl AstNode for ParenthesizedArgList {
5757    #[inline]
5758    fn kind() -> SyntaxKind
5759    where
5760        Self: Sized,
5761    {
5762        PARENTHESIZED_ARG_LIST
5763    }
5764    #[inline]
5765    fn can_cast(kind: SyntaxKind) -> bool { kind == PARENTHESIZED_ARG_LIST }
5766    #[inline]
5767    fn cast(syntax: SyntaxNode) -> Option<Self> {
5768        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5769    }
5770    #[inline]
5771    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5772}
5773impl hash::Hash for ParenthesizedArgList {
5774    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5775}
5776impl Eq for ParenthesizedArgList {}
5777impl PartialEq for ParenthesizedArgList {
5778    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5779}
5780impl Clone for ParenthesizedArgList {
5781    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5782}
5783impl fmt::Debug for ParenthesizedArgList {
5784    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5785        f.debug_struct("ParenthesizedArgList").field("syntax", &self.syntax).finish()
5786    }
5787}
5788impl AstNode for Path {
5789    #[inline]
5790    fn kind() -> SyntaxKind
5791    where
5792        Self: Sized,
5793    {
5794        PATH
5795    }
5796    #[inline]
5797    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH }
5798    #[inline]
5799    fn cast(syntax: SyntaxNode) -> Option<Self> {
5800        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5801    }
5802    #[inline]
5803    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5804}
5805impl hash::Hash for Path {
5806    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5807}
5808impl Eq for Path {}
5809impl PartialEq for Path {
5810    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5811}
5812impl Clone for Path {
5813    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5814}
5815impl fmt::Debug for Path {
5816    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5817        f.debug_struct("Path").field("syntax", &self.syntax).finish()
5818    }
5819}
5820impl AstNode for PathExpr {
5821    #[inline]
5822    fn kind() -> SyntaxKind
5823    where
5824        Self: Sized,
5825    {
5826        PATH_EXPR
5827    }
5828    #[inline]
5829    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR }
5830    #[inline]
5831    fn cast(syntax: SyntaxNode) -> Option<Self> {
5832        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5833    }
5834    #[inline]
5835    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5836}
5837impl hash::Hash for PathExpr {
5838    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5839}
5840impl Eq for PathExpr {}
5841impl PartialEq for PathExpr {
5842    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5843}
5844impl Clone for PathExpr {
5845    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5846}
5847impl fmt::Debug for PathExpr {
5848    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5849        f.debug_struct("PathExpr").field("syntax", &self.syntax).finish()
5850    }
5851}
5852impl AstNode for PathMeta {
5853    #[inline]
5854    fn kind() -> SyntaxKind
5855    where
5856        Self: Sized,
5857    {
5858        PATH_META
5859    }
5860    #[inline]
5861    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_META }
5862    #[inline]
5863    fn cast(syntax: SyntaxNode) -> Option<Self> {
5864        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5865    }
5866    #[inline]
5867    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5868}
5869impl hash::Hash for PathMeta {
5870    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5871}
5872impl Eq for PathMeta {}
5873impl PartialEq for PathMeta {
5874    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5875}
5876impl Clone for PathMeta {
5877    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5878}
5879impl fmt::Debug for PathMeta {
5880    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5881        f.debug_struct("PathMeta").field("syntax", &self.syntax).finish()
5882    }
5883}
5884impl AstNode for PathPat {
5885    #[inline]
5886    fn kind() -> SyntaxKind
5887    where
5888        Self: Sized,
5889    {
5890        PATH_PAT
5891    }
5892    #[inline]
5893    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_PAT }
5894    #[inline]
5895    fn cast(syntax: SyntaxNode) -> Option<Self> {
5896        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5897    }
5898    #[inline]
5899    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5900}
5901impl hash::Hash for PathPat {
5902    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5903}
5904impl Eq for PathPat {}
5905impl PartialEq for PathPat {
5906    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5907}
5908impl Clone for PathPat {
5909    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5910}
5911impl fmt::Debug for PathPat {
5912    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5913        f.debug_struct("PathPat").field("syntax", &self.syntax).finish()
5914    }
5915}
5916impl AstNode for PathSegment {
5917    #[inline]
5918    fn kind() -> SyntaxKind
5919    where
5920        Self: Sized,
5921    {
5922        PATH_SEGMENT
5923    }
5924    #[inline]
5925    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT }
5926    #[inline]
5927    fn cast(syntax: SyntaxNode) -> Option<Self> {
5928        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5929    }
5930    #[inline]
5931    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5932}
5933impl hash::Hash for PathSegment {
5934    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5935}
5936impl Eq for PathSegment {}
5937impl PartialEq for PathSegment {
5938    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5939}
5940impl Clone for PathSegment {
5941    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5942}
5943impl fmt::Debug for PathSegment {
5944    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5945        f.debug_struct("PathSegment").field("syntax", &self.syntax).finish()
5946    }
5947}
5948impl AstNode for PathType {
5949    #[inline]
5950    fn kind() -> SyntaxKind
5951    where
5952        Self: Sized,
5953    {
5954        PATH_TYPE
5955    }
5956    #[inline]
5957    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE }
5958    #[inline]
5959    fn cast(syntax: SyntaxNode) -> Option<Self> {
5960        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5961    }
5962    #[inline]
5963    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5964}
5965impl hash::Hash for PathType {
5966    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5967}
5968impl Eq for PathType {}
5969impl PartialEq for PathType {
5970    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
5971}
5972impl Clone for PathType {
5973    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
5974}
5975impl fmt::Debug for PathType {
5976    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5977        f.debug_struct("PathType").field("syntax", &self.syntax).finish()
5978    }
5979}
5980impl AstNode for PatternType {
5981    #[inline]
5982    fn kind() -> SyntaxKind
5983    where
5984        Self: Sized,
5985    {
5986        PATTERN_TYPE
5987    }
5988    #[inline]
5989    fn can_cast(kind: SyntaxKind) -> bool { kind == PATTERN_TYPE }
5990    #[inline]
5991    fn cast(syntax: SyntaxNode) -> Option<Self> {
5992        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
5993    }
5994    #[inline]
5995    fn syntax(&self) -> &SyntaxNode { &self.syntax }
5996}
5997impl hash::Hash for PatternType {
5998    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
5999}
6000impl Eq for PatternType {}
6001impl PartialEq for PatternType {
6002    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6003}
6004impl Clone for PatternType {
6005    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6006}
6007impl fmt::Debug for PatternType {
6008    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6009        f.debug_struct("PatternType").field("syntax", &self.syntax).finish()
6010    }
6011}
6012impl AstNode for PrefixExpr {
6013    #[inline]
6014    fn kind() -> SyntaxKind
6015    where
6016        Self: Sized,
6017    {
6018        PREFIX_EXPR
6019    }
6020    #[inline]
6021    fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR }
6022    #[inline]
6023    fn cast(syntax: SyntaxNode) -> Option<Self> {
6024        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6025    }
6026    #[inline]
6027    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6028}
6029impl hash::Hash for PrefixExpr {
6030    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6031}
6032impl Eq for PrefixExpr {}
6033impl PartialEq for PrefixExpr {
6034    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6035}
6036impl Clone for PrefixExpr {
6037    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6038}
6039impl fmt::Debug for PrefixExpr {
6040    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6041        f.debug_struct("PrefixExpr").field("syntax", &self.syntax).finish()
6042    }
6043}
6044impl AstNode for PtrType {
6045    #[inline]
6046    fn kind() -> SyntaxKind
6047    where
6048        Self: Sized,
6049    {
6050        PTR_TYPE
6051    }
6052    #[inline]
6053    fn can_cast(kind: SyntaxKind) -> bool { kind == PTR_TYPE }
6054    #[inline]
6055    fn cast(syntax: SyntaxNode) -> Option<Self> {
6056        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6057    }
6058    #[inline]
6059    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6060}
6061impl hash::Hash for PtrType {
6062    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6063}
6064impl Eq for PtrType {}
6065impl PartialEq for PtrType {
6066    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6067}
6068impl Clone for PtrType {
6069    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6070}
6071impl fmt::Debug for PtrType {
6072    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6073        f.debug_struct("PtrType").field("syntax", &self.syntax).finish()
6074    }
6075}
6076impl AstNode for RangeExpr {
6077    #[inline]
6078    fn kind() -> SyntaxKind
6079    where
6080        Self: Sized,
6081    {
6082        RANGE_EXPR
6083    }
6084    #[inline]
6085    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR }
6086    #[inline]
6087    fn cast(syntax: SyntaxNode) -> Option<Self> {
6088        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6089    }
6090    #[inline]
6091    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6092}
6093impl hash::Hash for RangeExpr {
6094    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6095}
6096impl Eq for RangeExpr {}
6097impl PartialEq for RangeExpr {
6098    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6099}
6100impl Clone for RangeExpr {
6101    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6102}
6103impl fmt::Debug for RangeExpr {
6104    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6105        f.debug_struct("RangeExpr").field("syntax", &self.syntax).finish()
6106    }
6107}
6108impl AstNode for RangePat {
6109    #[inline]
6110    fn kind() -> SyntaxKind
6111    where
6112        Self: Sized,
6113    {
6114        RANGE_PAT
6115    }
6116    #[inline]
6117    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_PAT }
6118    #[inline]
6119    fn cast(syntax: SyntaxNode) -> Option<Self> {
6120        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6121    }
6122    #[inline]
6123    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6124}
6125impl hash::Hash for RangePat {
6126    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6127}
6128impl Eq for RangePat {}
6129impl PartialEq for RangePat {
6130    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6131}
6132impl Clone for RangePat {
6133    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6134}
6135impl fmt::Debug for RangePat {
6136    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6137        f.debug_struct("RangePat").field("syntax", &self.syntax).finish()
6138    }
6139}
6140impl AstNode for RecordExpr {
6141    #[inline]
6142    fn kind() -> SyntaxKind
6143    where
6144        Self: Sized,
6145    {
6146        RECORD_EXPR
6147    }
6148    #[inline]
6149    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR }
6150    #[inline]
6151    fn cast(syntax: SyntaxNode) -> Option<Self> {
6152        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6153    }
6154    #[inline]
6155    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6156}
6157impl hash::Hash for RecordExpr {
6158    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6159}
6160impl Eq for RecordExpr {}
6161impl PartialEq for RecordExpr {
6162    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6163}
6164impl Clone for RecordExpr {
6165    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6166}
6167impl fmt::Debug for RecordExpr {
6168    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6169        f.debug_struct("RecordExpr").field("syntax", &self.syntax).finish()
6170    }
6171}
6172impl AstNode for RecordExprField {
6173    #[inline]
6174    fn kind() -> SyntaxKind
6175    where
6176        Self: Sized,
6177    {
6178        RECORD_EXPR_FIELD
6179    }
6180    #[inline]
6181    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD }
6182    #[inline]
6183    fn cast(syntax: SyntaxNode) -> Option<Self> {
6184        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6185    }
6186    #[inline]
6187    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6188}
6189impl hash::Hash for RecordExprField {
6190    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6191}
6192impl Eq for RecordExprField {}
6193impl PartialEq for RecordExprField {
6194    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6195}
6196impl Clone for RecordExprField {
6197    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6198}
6199impl fmt::Debug for RecordExprField {
6200    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6201        f.debug_struct("RecordExprField").field("syntax", &self.syntax).finish()
6202    }
6203}
6204impl AstNode for RecordExprFieldList {
6205    #[inline]
6206    fn kind() -> SyntaxKind
6207    where
6208        Self: Sized,
6209    {
6210        RECORD_EXPR_FIELD_LIST
6211    }
6212    #[inline]
6213    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST }
6214    #[inline]
6215    fn cast(syntax: SyntaxNode) -> Option<Self> {
6216        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6217    }
6218    #[inline]
6219    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6220}
6221impl hash::Hash for RecordExprFieldList {
6222    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6223}
6224impl Eq for RecordExprFieldList {}
6225impl PartialEq for RecordExprFieldList {
6226    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6227}
6228impl Clone for RecordExprFieldList {
6229    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6230}
6231impl fmt::Debug for RecordExprFieldList {
6232    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6233        f.debug_struct("RecordExprFieldList").field("syntax", &self.syntax).finish()
6234    }
6235}
6236impl AstNode for RecordField {
6237    #[inline]
6238    fn kind() -> SyntaxKind
6239    where
6240        Self: Sized,
6241    {
6242        RECORD_FIELD
6243    }
6244    #[inline]
6245    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD }
6246    #[inline]
6247    fn cast(syntax: SyntaxNode) -> Option<Self> {
6248        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6249    }
6250    #[inline]
6251    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6252}
6253impl hash::Hash for RecordField {
6254    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6255}
6256impl Eq for RecordField {}
6257impl PartialEq for RecordField {
6258    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6259}
6260impl Clone for RecordField {
6261    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6262}
6263impl fmt::Debug for RecordField {
6264    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6265        f.debug_struct("RecordField").field("syntax", &self.syntax).finish()
6266    }
6267}
6268impl AstNode for RecordFieldList {
6269    #[inline]
6270    fn kind() -> SyntaxKind
6271    where
6272        Self: Sized,
6273    {
6274        RECORD_FIELD_LIST
6275    }
6276    #[inline]
6277    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST }
6278    #[inline]
6279    fn cast(syntax: SyntaxNode) -> Option<Self> {
6280        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6281    }
6282    #[inline]
6283    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6284}
6285impl hash::Hash for RecordFieldList {
6286    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6287}
6288impl Eq for RecordFieldList {}
6289impl PartialEq for RecordFieldList {
6290    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6291}
6292impl Clone for RecordFieldList {
6293    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6294}
6295impl fmt::Debug for RecordFieldList {
6296    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6297        f.debug_struct("RecordFieldList").field("syntax", &self.syntax).finish()
6298    }
6299}
6300impl AstNode for RecordPat {
6301    #[inline]
6302    fn kind() -> SyntaxKind
6303    where
6304        Self: Sized,
6305    {
6306        RECORD_PAT
6307    }
6308    #[inline]
6309    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT }
6310    #[inline]
6311    fn cast(syntax: SyntaxNode) -> Option<Self> {
6312        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6313    }
6314    #[inline]
6315    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6316}
6317impl hash::Hash for RecordPat {
6318    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6319}
6320impl Eq for RecordPat {}
6321impl PartialEq for RecordPat {
6322    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6323}
6324impl Clone for RecordPat {
6325    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6326}
6327impl fmt::Debug for RecordPat {
6328    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6329        f.debug_struct("RecordPat").field("syntax", &self.syntax).finish()
6330    }
6331}
6332impl AstNode for RecordPatField {
6333    #[inline]
6334    fn kind() -> SyntaxKind
6335    where
6336        Self: Sized,
6337    {
6338        RECORD_PAT_FIELD
6339    }
6340    #[inline]
6341    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT_FIELD }
6342    #[inline]
6343    fn cast(syntax: SyntaxNode) -> Option<Self> {
6344        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6345    }
6346    #[inline]
6347    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6348}
6349impl hash::Hash for RecordPatField {
6350    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6351}
6352impl Eq for RecordPatField {}
6353impl PartialEq for RecordPatField {
6354    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6355}
6356impl Clone for RecordPatField {
6357    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6358}
6359impl fmt::Debug for RecordPatField {
6360    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6361        f.debug_struct("RecordPatField").field("syntax", &self.syntax).finish()
6362    }
6363}
6364impl AstNode for RecordPatFieldList {
6365    #[inline]
6366    fn kind() -> SyntaxKind
6367    where
6368        Self: Sized,
6369    {
6370        RECORD_PAT_FIELD_LIST
6371    }
6372    #[inline]
6373    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_PAT_FIELD_LIST }
6374    #[inline]
6375    fn cast(syntax: SyntaxNode) -> Option<Self> {
6376        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6377    }
6378    #[inline]
6379    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6380}
6381impl hash::Hash for RecordPatFieldList {
6382    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6383}
6384impl Eq for RecordPatFieldList {}
6385impl PartialEq for RecordPatFieldList {
6386    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6387}
6388impl Clone for RecordPatFieldList {
6389    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6390}
6391impl fmt::Debug for RecordPatFieldList {
6392    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6393        f.debug_struct("RecordPatFieldList").field("syntax", &self.syntax).finish()
6394    }
6395}
6396impl AstNode for RefExpr {
6397    #[inline]
6398    fn kind() -> SyntaxKind
6399    where
6400        Self: Sized,
6401    {
6402        REF_EXPR
6403    }
6404    #[inline]
6405    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR }
6406    #[inline]
6407    fn cast(syntax: SyntaxNode) -> Option<Self> {
6408        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6409    }
6410    #[inline]
6411    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6412}
6413impl hash::Hash for RefExpr {
6414    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6415}
6416impl Eq for RefExpr {}
6417impl PartialEq for RefExpr {
6418    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6419}
6420impl Clone for RefExpr {
6421    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6422}
6423impl fmt::Debug for RefExpr {
6424    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6425        f.debug_struct("RefExpr").field("syntax", &self.syntax).finish()
6426    }
6427}
6428impl AstNode for RefPat {
6429    #[inline]
6430    fn kind() -> SyntaxKind
6431    where
6432        Self: Sized,
6433    {
6434        REF_PAT
6435    }
6436    #[inline]
6437    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_PAT }
6438    #[inline]
6439    fn cast(syntax: SyntaxNode) -> Option<Self> {
6440        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6441    }
6442    #[inline]
6443    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6444}
6445impl hash::Hash for RefPat {
6446    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6447}
6448impl Eq for RefPat {}
6449impl PartialEq for RefPat {
6450    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6451}
6452impl Clone for RefPat {
6453    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6454}
6455impl fmt::Debug for RefPat {
6456    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6457        f.debug_struct("RefPat").field("syntax", &self.syntax).finish()
6458    }
6459}
6460impl AstNode for RefType {
6461    #[inline]
6462    fn kind() -> SyntaxKind
6463    where
6464        Self: Sized,
6465    {
6466        REF_TYPE
6467    }
6468    #[inline]
6469    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_TYPE }
6470    #[inline]
6471    fn cast(syntax: SyntaxNode) -> Option<Self> {
6472        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6473    }
6474    #[inline]
6475    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6476}
6477impl hash::Hash for RefType {
6478    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6479}
6480impl Eq for RefType {}
6481impl PartialEq for RefType {
6482    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6483}
6484impl Clone for RefType {
6485    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6486}
6487impl fmt::Debug for RefType {
6488    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6489        f.debug_struct("RefType").field("syntax", &self.syntax).finish()
6490    }
6491}
6492impl AstNode for Rename {
6493    #[inline]
6494    fn kind() -> SyntaxKind
6495    where
6496        Self: Sized,
6497    {
6498        RENAME
6499    }
6500    #[inline]
6501    fn can_cast(kind: SyntaxKind) -> bool { kind == RENAME }
6502    #[inline]
6503    fn cast(syntax: SyntaxNode) -> Option<Self> {
6504        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6505    }
6506    #[inline]
6507    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6508}
6509impl hash::Hash for Rename {
6510    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6511}
6512impl Eq for Rename {}
6513impl PartialEq for Rename {
6514    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6515}
6516impl Clone for Rename {
6517    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6518}
6519impl fmt::Debug for Rename {
6520    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6521        f.debug_struct("Rename").field("syntax", &self.syntax).finish()
6522    }
6523}
6524impl AstNode for RestPat {
6525    #[inline]
6526    fn kind() -> SyntaxKind
6527    where
6528        Self: Sized,
6529    {
6530        REST_PAT
6531    }
6532    #[inline]
6533    fn can_cast(kind: SyntaxKind) -> bool { kind == REST_PAT }
6534    #[inline]
6535    fn cast(syntax: SyntaxNode) -> Option<Self> {
6536        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6537    }
6538    #[inline]
6539    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6540}
6541impl hash::Hash for RestPat {
6542    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6543}
6544impl Eq for RestPat {}
6545impl PartialEq for RestPat {
6546    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6547}
6548impl Clone for RestPat {
6549    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6550}
6551impl fmt::Debug for RestPat {
6552    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6553        f.debug_struct("RestPat").field("syntax", &self.syntax).finish()
6554    }
6555}
6556impl AstNode for RetType {
6557    #[inline]
6558    fn kind() -> SyntaxKind
6559    where
6560        Self: Sized,
6561    {
6562        RET_TYPE
6563    }
6564    #[inline]
6565    fn can_cast(kind: SyntaxKind) -> bool { kind == RET_TYPE }
6566    #[inline]
6567    fn cast(syntax: SyntaxNode) -> Option<Self> {
6568        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6569    }
6570    #[inline]
6571    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6572}
6573impl hash::Hash for RetType {
6574    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6575}
6576impl Eq for RetType {}
6577impl PartialEq for RetType {
6578    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6579}
6580impl Clone for RetType {
6581    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6582}
6583impl fmt::Debug for RetType {
6584    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6585        f.debug_struct("RetType").field("syntax", &self.syntax).finish()
6586    }
6587}
6588impl AstNode for ReturnExpr {
6589    #[inline]
6590    fn kind() -> SyntaxKind
6591    where
6592        Self: Sized,
6593    {
6594        RETURN_EXPR
6595    }
6596    #[inline]
6597    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR }
6598    #[inline]
6599    fn cast(syntax: SyntaxNode) -> Option<Self> {
6600        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6601    }
6602    #[inline]
6603    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6604}
6605impl hash::Hash for ReturnExpr {
6606    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6607}
6608impl Eq for ReturnExpr {}
6609impl PartialEq for ReturnExpr {
6610    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6611}
6612impl Clone for ReturnExpr {
6613    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6614}
6615impl fmt::Debug for ReturnExpr {
6616    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6617        f.debug_struct("ReturnExpr").field("syntax", &self.syntax).finish()
6618    }
6619}
6620impl AstNode for ReturnTypeSyntax {
6621    #[inline]
6622    fn kind() -> SyntaxKind
6623    where
6624        Self: Sized,
6625    {
6626        RETURN_TYPE_SYNTAX
6627    }
6628    #[inline]
6629    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_TYPE_SYNTAX }
6630    #[inline]
6631    fn cast(syntax: SyntaxNode) -> Option<Self> {
6632        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6633    }
6634    #[inline]
6635    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6636}
6637impl hash::Hash for ReturnTypeSyntax {
6638    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6639}
6640impl Eq for ReturnTypeSyntax {}
6641impl PartialEq for ReturnTypeSyntax {
6642    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6643}
6644impl Clone for ReturnTypeSyntax {
6645    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6646}
6647impl fmt::Debug for ReturnTypeSyntax {
6648    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6649        f.debug_struct("ReturnTypeSyntax").field("syntax", &self.syntax).finish()
6650    }
6651}
6652impl AstNode for SelfParam {
6653    #[inline]
6654    fn kind() -> SyntaxKind
6655    where
6656        Self: Sized,
6657    {
6658        SELF_PARAM
6659    }
6660    #[inline]
6661    fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM }
6662    #[inline]
6663    fn cast(syntax: SyntaxNode) -> Option<Self> {
6664        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6665    }
6666    #[inline]
6667    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6668}
6669impl hash::Hash for SelfParam {
6670    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6671}
6672impl Eq for SelfParam {}
6673impl PartialEq for SelfParam {
6674    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6675}
6676impl Clone for SelfParam {
6677    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6678}
6679impl fmt::Debug for SelfParam {
6680    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6681        f.debug_struct("SelfParam").field("syntax", &self.syntax).finish()
6682    }
6683}
6684impl AstNode for SlicePat {
6685    #[inline]
6686    fn kind() -> SyntaxKind
6687    where
6688        Self: Sized,
6689    {
6690        SLICE_PAT
6691    }
6692    #[inline]
6693    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_PAT }
6694    #[inline]
6695    fn cast(syntax: SyntaxNode) -> Option<Self> {
6696        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6697    }
6698    #[inline]
6699    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6700}
6701impl hash::Hash for SlicePat {
6702    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6703}
6704impl Eq for SlicePat {}
6705impl PartialEq for SlicePat {
6706    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6707}
6708impl Clone for SlicePat {
6709    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6710}
6711impl fmt::Debug for SlicePat {
6712    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6713        f.debug_struct("SlicePat").field("syntax", &self.syntax).finish()
6714    }
6715}
6716impl AstNode for SliceType {
6717    #[inline]
6718    fn kind() -> SyntaxKind
6719    where
6720        Self: Sized,
6721    {
6722        SLICE_TYPE
6723    }
6724    #[inline]
6725    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE }
6726    #[inline]
6727    fn cast(syntax: SyntaxNode) -> Option<Self> {
6728        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6729    }
6730    #[inline]
6731    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6732}
6733impl hash::Hash for SliceType {
6734    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6735}
6736impl Eq for SliceType {}
6737impl PartialEq for SliceType {
6738    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6739}
6740impl Clone for SliceType {
6741    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6742}
6743impl fmt::Debug for SliceType {
6744    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6745        f.debug_struct("SliceType").field("syntax", &self.syntax).finish()
6746    }
6747}
6748impl AstNode for SourceFile {
6749    #[inline]
6750    fn kind() -> SyntaxKind
6751    where
6752        Self: Sized,
6753    {
6754        SOURCE_FILE
6755    }
6756    #[inline]
6757    fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE }
6758    #[inline]
6759    fn cast(syntax: SyntaxNode) -> Option<Self> {
6760        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6761    }
6762    #[inline]
6763    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6764}
6765impl hash::Hash for SourceFile {
6766    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6767}
6768impl Eq for SourceFile {}
6769impl PartialEq for SourceFile {
6770    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6771}
6772impl Clone for SourceFile {
6773    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6774}
6775impl fmt::Debug for SourceFile {
6776    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6777        f.debug_struct("SourceFile").field("syntax", &self.syntax).finish()
6778    }
6779}
6780impl AstNode for Static {
6781    #[inline]
6782    fn kind() -> SyntaxKind
6783    where
6784        Self: Sized,
6785    {
6786        STATIC
6787    }
6788    #[inline]
6789    fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC }
6790    #[inline]
6791    fn cast(syntax: SyntaxNode) -> Option<Self> {
6792        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6793    }
6794    #[inline]
6795    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6796}
6797impl hash::Hash for Static {
6798    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6799}
6800impl Eq for Static {}
6801impl PartialEq for Static {
6802    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6803}
6804impl Clone for Static {
6805    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6806}
6807impl fmt::Debug for Static {
6808    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6809        f.debug_struct("Static").field("syntax", &self.syntax).finish()
6810    }
6811}
6812impl AstNode for StmtList {
6813    #[inline]
6814    fn kind() -> SyntaxKind
6815    where
6816        Self: Sized,
6817    {
6818        STMT_LIST
6819    }
6820    #[inline]
6821    fn can_cast(kind: SyntaxKind) -> bool { kind == STMT_LIST }
6822    #[inline]
6823    fn cast(syntax: SyntaxNode) -> Option<Self> {
6824        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6825    }
6826    #[inline]
6827    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6828}
6829impl hash::Hash for StmtList {
6830    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6831}
6832impl Eq for StmtList {}
6833impl PartialEq for StmtList {
6834    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6835}
6836impl Clone for StmtList {
6837    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6838}
6839impl fmt::Debug for StmtList {
6840    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6841        f.debug_struct("StmtList").field("syntax", &self.syntax).finish()
6842    }
6843}
6844impl AstNode for Struct {
6845    #[inline]
6846    fn kind() -> SyntaxKind
6847    where
6848        Self: Sized,
6849    {
6850        STRUCT
6851    }
6852    #[inline]
6853    fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT }
6854    #[inline]
6855    fn cast(syntax: SyntaxNode) -> Option<Self> {
6856        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6857    }
6858    #[inline]
6859    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6860}
6861impl hash::Hash for Struct {
6862    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6863}
6864impl Eq for Struct {}
6865impl PartialEq for Struct {
6866    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6867}
6868impl Clone for Struct {
6869    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6870}
6871impl fmt::Debug for Struct {
6872    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6873        f.debug_struct("Struct").field("syntax", &self.syntax).finish()
6874    }
6875}
6876impl AstNode for TokenTree {
6877    #[inline]
6878    fn kind() -> SyntaxKind
6879    where
6880        Self: Sized,
6881    {
6882        TOKEN_TREE
6883    }
6884    #[inline]
6885    fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE }
6886    #[inline]
6887    fn cast(syntax: SyntaxNode) -> Option<Self> {
6888        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6889    }
6890    #[inline]
6891    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6892}
6893impl hash::Hash for TokenTree {
6894    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6895}
6896impl Eq for TokenTree {}
6897impl PartialEq for TokenTree {
6898    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6899}
6900impl Clone for TokenTree {
6901    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6902}
6903impl fmt::Debug for TokenTree {
6904    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6905        f.debug_struct("TokenTree").field("syntax", &self.syntax).finish()
6906    }
6907}
6908impl AstNode for TokenTreeMeta {
6909    #[inline]
6910    fn kind() -> SyntaxKind
6911    where
6912        Self: Sized,
6913    {
6914        TOKEN_TREE_META
6915    }
6916    #[inline]
6917    fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE_META }
6918    #[inline]
6919    fn cast(syntax: SyntaxNode) -> Option<Self> {
6920        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6921    }
6922    #[inline]
6923    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6924}
6925impl hash::Hash for TokenTreeMeta {
6926    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6927}
6928impl Eq for TokenTreeMeta {}
6929impl PartialEq for TokenTreeMeta {
6930    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6931}
6932impl Clone for TokenTreeMeta {
6933    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6934}
6935impl fmt::Debug for TokenTreeMeta {
6936    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6937        f.debug_struct("TokenTreeMeta").field("syntax", &self.syntax).finish()
6938    }
6939}
6940impl AstNode for Trait {
6941    #[inline]
6942    fn kind() -> SyntaxKind
6943    where
6944        Self: Sized,
6945    {
6946        TRAIT
6947    }
6948    #[inline]
6949    fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT }
6950    #[inline]
6951    fn cast(syntax: SyntaxNode) -> Option<Self> {
6952        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6953    }
6954    #[inline]
6955    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6956}
6957impl hash::Hash for Trait {
6958    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6959}
6960impl Eq for Trait {}
6961impl PartialEq for Trait {
6962    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6963}
6964impl Clone for Trait {
6965    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6966}
6967impl fmt::Debug for Trait {
6968    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6969        f.debug_struct("Trait").field("syntax", &self.syntax).finish()
6970    }
6971}
6972impl AstNode for TryBlockModifier {
6973    #[inline]
6974    fn kind() -> SyntaxKind
6975    where
6976        Self: Sized,
6977    {
6978        TRY_BLOCK_MODIFIER
6979    }
6980    #[inline]
6981    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_BLOCK_MODIFIER }
6982    #[inline]
6983    fn cast(syntax: SyntaxNode) -> Option<Self> {
6984        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
6985    }
6986    #[inline]
6987    fn syntax(&self) -> &SyntaxNode { &self.syntax }
6988}
6989impl hash::Hash for TryBlockModifier {
6990    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
6991}
6992impl Eq for TryBlockModifier {}
6993impl PartialEq for TryBlockModifier {
6994    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
6995}
6996impl Clone for TryBlockModifier {
6997    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
6998}
6999impl fmt::Debug for TryBlockModifier {
7000    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7001        f.debug_struct("TryBlockModifier").field("syntax", &self.syntax).finish()
7002    }
7003}
7004impl AstNode for TryExpr {
7005    #[inline]
7006    fn kind() -> SyntaxKind
7007    where
7008        Self: Sized,
7009    {
7010        TRY_EXPR
7011    }
7012    #[inline]
7013    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR }
7014    #[inline]
7015    fn cast(syntax: SyntaxNode) -> Option<Self> {
7016        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7017    }
7018    #[inline]
7019    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7020}
7021impl hash::Hash for TryExpr {
7022    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7023}
7024impl Eq for TryExpr {}
7025impl PartialEq for TryExpr {
7026    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7027}
7028impl Clone for TryExpr {
7029    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7030}
7031impl fmt::Debug for TryExpr {
7032    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7033        f.debug_struct("TryExpr").field("syntax", &self.syntax).finish()
7034    }
7035}
7036impl AstNode for TupleExpr {
7037    #[inline]
7038    fn kind() -> SyntaxKind
7039    where
7040        Self: Sized,
7041    {
7042        TUPLE_EXPR
7043    }
7044    #[inline]
7045    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR }
7046    #[inline]
7047    fn cast(syntax: SyntaxNode) -> Option<Self> {
7048        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7049    }
7050    #[inline]
7051    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7052}
7053impl hash::Hash for TupleExpr {
7054    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7055}
7056impl Eq for TupleExpr {}
7057impl PartialEq for TupleExpr {
7058    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7059}
7060impl Clone for TupleExpr {
7061    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7062}
7063impl fmt::Debug for TupleExpr {
7064    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7065        f.debug_struct("TupleExpr").field("syntax", &self.syntax).finish()
7066    }
7067}
7068impl AstNode for TupleField {
7069    #[inline]
7070    fn kind() -> SyntaxKind
7071    where
7072        Self: Sized,
7073    {
7074        TUPLE_FIELD
7075    }
7076    #[inline]
7077    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD }
7078    #[inline]
7079    fn cast(syntax: SyntaxNode) -> Option<Self> {
7080        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7081    }
7082    #[inline]
7083    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7084}
7085impl hash::Hash for TupleField {
7086    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7087}
7088impl Eq for TupleField {}
7089impl PartialEq for TupleField {
7090    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7091}
7092impl Clone for TupleField {
7093    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7094}
7095impl fmt::Debug for TupleField {
7096    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7097        f.debug_struct("TupleField").field("syntax", &self.syntax).finish()
7098    }
7099}
7100impl AstNode for TupleFieldList {
7101    #[inline]
7102    fn kind() -> SyntaxKind
7103    where
7104        Self: Sized,
7105    {
7106        TUPLE_FIELD_LIST
7107    }
7108    #[inline]
7109    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_LIST }
7110    #[inline]
7111    fn cast(syntax: SyntaxNode) -> Option<Self> {
7112        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7113    }
7114    #[inline]
7115    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7116}
7117impl hash::Hash for TupleFieldList {
7118    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7119}
7120impl Eq for TupleFieldList {}
7121impl PartialEq for TupleFieldList {
7122    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7123}
7124impl Clone for TupleFieldList {
7125    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7126}
7127impl fmt::Debug for TupleFieldList {
7128    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7129        f.debug_struct("TupleFieldList").field("syntax", &self.syntax).finish()
7130    }
7131}
7132impl AstNode for TuplePat {
7133    #[inline]
7134    fn kind() -> SyntaxKind
7135    where
7136        Self: Sized,
7137    {
7138        TUPLE_PAT
7139    }
7140    #[inline]
7141    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_PAT }
7142    #[inline]
7143    fn cast(syntax: SyntaxNode) -> Option<Self> {
7144        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7145    }
7146    #[inline]
7147    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7148}
7149impl hash::Hash for TuplePat {
7150    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7151}
7152impl Eq for TuplePat {}
7153impl PartialEq for TuplePat {
7154    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7155}
7156impl Clone for TuplePat {
7157    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7158}
7159impl fmt::Debug for TuplePat {
7160    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7161        f.debug_struct("TuplePat").field("syntax", &self.syntax).finish()
7162    }
7163}
7164impl AstNode for TupleStructPat {
7165    #[inline]
7166    fn kind() -> SyntaxKind
7167    where
7168        Self: Sized,
7169    {
7170        TUPLE_STRUCT_PAT
7171    }
7172    #[inline]
7173    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_STRUCT_PAT }
7174    #[inline]
7175    fn cast(syntax: SyntaxNode) -> Option<Self> {
7176        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7177    }
7178    #[inline]
7179    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7180}
7181impl hash::Hash for TupleStructPat {
7182    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7183}
7184impl Eq for TupleStructPat {}
7185impl PartialEq for TupleStructPat {
7186    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7187}
7188impl Clone for TupleStructPat {
7189    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7190}
7191impl fmt::Debug for TupleStructPat {
7192    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7193        f.debug_struct("TupleStructPat").field("syntax", &self.syntax).finish()
7194    }
7195}
7196impl AstNode for TupleType {
7197    #[inline]
7198    fn kind() -> SyntaxKind
7199    where
7200        Self: Sized,
7201    {
7202        TUPLE_TYPE
7203    }
7204    #[inline]
7205    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE }
7206    #[inline]
7207    fn cast(syntax: SyntaxNode) -> Option<Self> {
7208        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7209    }
7210    #[inline]
7211    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7212}
7213impl hash::Hash for TupleType {
7214    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7215}
7216impl Eq for TupleType {}
7217impl PartialEq for TupleType {
7218    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7219}
7220impl Clone for TupleType {
7221    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7222}
7223impl fmt::Debug for TupleType {
7224    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7225        f.debug_struct("TupleType").field("syntax", &self.syntax).finish()
7226    }
7227}
7228impl AstNode for TypeAlias {
7229    #[inline]
7230    fn kind() -> SyntaxKind
7231    where
7232        Self: Sized,
7233    {
7234        TYPE_ALIAS
7235    }
7236    #[inline]
7237    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS }
7238    #[inline]
7239    fn cast(syntax: SyntaxNode) -> Option<Self> {
7240        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7241    }
7242    #[inline]
7243    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7244}
7245impl hash::Hash for TypeAlias {
7246    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7247}
7248impl Eq for TypeAlias {}
7249impl PartialEq for TypeAlias {
7250    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7251}
7252impl Clone for TypeAlias {
7253    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7254}
7255impl fmt::Debug for TypeAlias {
7256    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7257        f.debug_struct("TypeAlias").field("syntax", &self.syntax).finish()
7258    }
7259}
7260impl AstNode for TypeAnchor {
7261    #[inline]
7262    fn kind() -> SyntaxKind
7263    where
7264        Self: Sized,
7265    {
7266        TYPE_ANCHOR
7267    }
7268    #[inline]
7269    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ANCHOR }
7270    #[inline]
7271    fn cast(syntax: SyntaxNode) -> Option<Self> {
7272        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7273    }
7274    #[inline]
7275    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7276}
7277impl hash::Hash for TypeAnchor {
7278    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7279}
7280impl Eq for TypeAnchor {}
7281impl PartialEq for TypeAnchor {
7282    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7283}
7284impl Clone for TypeAnchor {
7285    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7286}
7287impl fmt::Debug for TypeAnchor {
7288    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7289        f.debug_struct("TypeAnchor").field("syntax", &self.syntax).finish()
7290    }
7291}
7292impl AstNode for TypeArg {
7293    #[inline]
7294    fn kind() -> SyntaxKind
7295    where
7296        Self: Sized,
7297    {
7298        TYPE_ARG
7299    }
7300    #[inline]
7301    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG }
7302    #[inline]
7303    fn cast(syntax: SyntaxNode) -> Option<Self> {
7304        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7305    }
7306    #[inline]
7307    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7308}
7309impl hash::Hash for TypeArg {
7310    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7311}
7312impl Eq for TypeArg {}
7313impl PartialEq for TypeArg {
7314    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7315}
7316impl Clone for TypeArg {
7317    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7318}
7319impl fmt::Debug for TypeArg {
7320    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7321        f.debug_struct("TypeArg").field("syntax", &self.syntax).finish()
7322    }
7323}
7324impl AstNode for TypeBound {
7325    #[inline]
7326    fn kind() -> SyntaxKind
7327    where
7328        Self: Sized,
7329    {
7330        TYPE_BOUND
7331    }
7332    #[inline]
7333    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND }
7334    #[inline]
7335    fn cast(syntax: SyntaxNode) -> Option<Self> {
7336        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7337    }
7338    #[inline]
7339    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7340}
7341impl hash::Hash for TypeBound {
7342    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7343}
7344impl Eq for TypeBound {}
7345impl PartialEq for TypeBound {
7346    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7347}
7348impl Clone for TypeBound {
7349    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7350}
7351impl fmt::Debug for TypeBound {
7352    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7353        f.debug_struct("TypeBound").field("syntax", &self.syntax).finish()
7354    }
7355}
7356impl AstNode for TypeBoundList {
7357    #[inline]
7358    fn kind() -> SyntaxKind
7359    where
7360        Self: Sized,
7361    {
7362        TYPE_BOUND_LIST
7363    }
7364    #[inline]
7365    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
7366    #[inline]
7367    fn cast(syntax: SyntaxNode) -> Option<Self> {
7368        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7369    }
7370    #[inline]
7371    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7372}
7373impl hash::Hash for TypeBoundList {
7374    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7375}
7376impl Eq for TypeBoundList {}
7377impl PartialEq for TypeBoundList {
7378    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7379}
7380impl Clone for TypeBoundList {
7381    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7382}
7383impl fmt::Debug for TypeBoundList {
7384    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7385        f.debug_struct("TypeBoundList").field("syntax", &self.syntax).finish()
7386    }
7387}
7388impl AstNode for TypeParam {
7389    #[inline]
7390    fn kind() -> SyntaxKind
7391    where
7392        Self: Sized,
7393    {
7394        TYPE_PARAM
7395    }
7396    #[inline]
7397    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM }
7398    #[inline]
7399    fn cast(syntax: SyntaxNode) -> Option<Self> {
7400        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7401    }
7402    #[inline]
7403    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7404}
7405impl hash::Hash for TypeParam {
7406    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7407}
7408impl Eq for TypeParam {}
7409impl PartialEq for TypeParam {
7410    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7411}
7412impl Clone for TypeParam {
7413    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7414}
7415impl fmt::Debug for TypeParam {
7416    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7417        f.debug_struct("TypeParam").field("syntax", &self.syntax).finish()
7418    }
7419}
7420impl AstNode for UnderscoreExpr {
7421    #[inline]
7422    fn kind() -> SyntaxKind
7423    where
7424        Self: Sized,
7425    {
7426        UNDERSCORE_EXPR
7427    }
7428    #[inline]
7429    fn can_cast(kind: SyntaxKind) -> bool { kind == UNDERSCORE_EXPR }
7430    #[inline]
7431    fn cast(syntax: SyntaxNode) -> Option<Self> {
7432        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7433    }
7434    #[inline]
7435    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7436}
7437impl hash::Hash for UnderscoreExpr {
7438    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7439}
7440impl Eq for UnderscoreExpr {}
7441impl PartialEq for UnderscoreExpr {
7442    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7443}
7444impl Clone for UnderscoreExpr {
7445    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7446}
7447impl fmt::Debug for UnderscoreExpr {
7448    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7449        f.debug_struct("UnderscoreExpr").field("syntax", &self.syntax).finish()
7450    }
7451}
7452impl AstNode for Union {
7453    #[inline]
7454    fn kind() -> SyntaxKind
7455    where
7456        Self: Sized,
7457    {
7458        UNION
7459    }
7460    #[inline]
7461    fn can_cast(kind: SyntaxKind) -> bool { kind == UNION }
7462    #[inline]
7463    fn cast(syntax: SyntaxNode) -> Option<Self> {
7464        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7465    }
7466    #[inline]
7467    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7468}
7469impl hash::Hash for Union {
7470    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7471}
7472impl Eq for Union {}
7473impl PartialEq for Union {
7474    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7475}
7476impl Clone for Union {
7477    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7478}
7479impl fmt::Debug for Union {
7480    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7481        f.debug_struct("Union").field("syntax", &self.syntax).finish()
7482    }
7483}
7484impl AstNode for UnsafeMeta {
7485    #[inline]
7486    fn kind() -> SyntaxKind
7487    where
7488        Self: Sized,
7489    {
7490        UNSAFE_META
7491    }
7492    #[inline]
7493    fn can_cast(kind: SyntaxKind) -> bool { kind == UNSAFE_META }
7494    #[inline]
7495    fn cast(syntax: SyntaxNode) -> Option<Self> {
7496        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7497    }
7498    #[inline]
7499    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7500}
7501impl hash::Hash for UnsafeMeta {
7502    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7503}
7504impl Eq for UnsafeMeta {}
7505impl PartialEq for UnsafeMeta {
7506    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7507}
7508impl Clone for UnsafeMeta {
7509    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7510}
7511impl fmt::Debug for UnsafeMeta {
7512    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7513        f.debug_struct("UnsafeMeta").field("syntax", &self.syntax).finish()
7514    }
7515}
7516impl AstNode for Use {
7517    #[inline]
7518    fn kind() -> SyntaxKind
7519    where
7520        Self: Sized,
7521    {
7522        USE
7523    }
7524    #[inline]
7525    fn can_cast(kind: SyntaxKind) -> bool { kind == USE }
7526    #[inline]
7527    fn cast(syntax: SyntaxNode) -> Option<Self> {
7528        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7529    }
7530    #[inline]
7531    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7532}
7533impl hash::Hash for Use {
7534    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7535}
7536impl Eq for Use {}
7537impl PartialEq for Use {
7538    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7539}
7540impl Clone for Use {
7541    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7542}
7543impl fmt::Debug for Use {
7544    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7545        f.debug_struct("Use").field("syntax", &self.syntax).finish()
7546    }
7547}
7548impl AstNode for UseBoundGenericArgs {
7549    #[inline]
7550    fn kind() -> SyntaxKind
7551    where
7552        Self: Sized,
7553    {
7554        USE_BOUND_GENERIC_ARGS
7555    }
7556    #[inline]
7557    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_BOUND_GENERIC_ARGS }
7558    #[inline]
7559    fn cast(syntax: SyntaxNode) -> Option<Self> {
7560        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7561    }
7562    #[inline]
7563    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7564}
7565impl hash::Hash for UseBoundGenericArgs {
7566    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7567}
7568impl Eq for UseBoundGenericArgs {}
7569impl PartialEq for UseBoundGenericArgs {
7570    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7571}
7572impl Clone for UseBoundGenericArgs {
7573    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7574}
7575impl fmt::Debug for UseBoundGenericArgs {
7576    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7577        f.debug_struct("UseBoundGenericArgs").field("syntax", &self.syntax).finish()
7578    }
7579}
7580impl AstNode for UseTree {
7581    #[inline]
7582    fn kind() -> SyntaxKind
7583    where
7584        Self: Sized,
7585    {
7586        USE_TREE
7587    }
7588    #[inline]
7589    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE }
7590    #[inline]
7591    fn cast(syntax: SyntaxNode) -> Option<Self> {
7592        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7593    }
7594    #[inline]
7595    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7596}
7597impl hash::Hash for UseTree {
7598    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7599}
7600impl Eq for UseTree {}
7601impl PartialEq for UseTree {
7602    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7603}
7604impl Clone for UseTree {
7605    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7606}
7607impl fmt::Debug for UseTree {
7608    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7609        f.debug_struct("UseTree").field("syntax", &self.syntax).finish()
7610    }
7611}
7612impl AstNode for UseTreeList {
7613    #[inline]
7614    fn kind() -> SyntaxKind
7615    where
7616        Self: Sized,
7617    {
7618        USE_TREE_LIST
7619    }
7620    #[inline]
7621    fn can_cast(kind: SyntaxKind) -> bool { kind == USE_TREE_LIST }
7622    #[inline]
7623    fn cast(syntax: SyntaxNode) -> Option<Self> {
7624        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7625    }
7626    #[inline]
7627    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7628}
7629impl hash::Hash for UseTreeList {
7630    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7631}
7632impl Eq for UseTreeList {}
7633impl PartialEq for UseTreeList {
7634    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7635}
7636impl Clone for UseTreeList {
7637    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7638}
7639impl fmt::Debug for UseTreeList {
7640    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7641        f.debug_struct("UseTreeList").field("syntax", &self.syntax).finish()
7642    }
7643}
7644impl AstNode for Variant {
7645    #[inline]
7646    fn kind() -> SyntaxKind
7647    where
7648        Self: Sized,
7649    {
7650        VARIANT
7651    }
7652    #[inline]
7653    fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT }
7654    #[inline]
7655    fn cast(syntax: SyntaxNode) -> Option<Self> {
7656        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7657    }
7658    #[inline]
7659    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7660}
7661impl hash::Hash for Variant {
7662    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7663}
7664impl Eq for Variant {}
7665impl PartialEq for Variant {
7666    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7667}
7668impl Clone for Variant {
7669    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7670}
7671impl fmt::Debug for Variant {
7672    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7673        f.debug_struct("Variant").field("syntax", &self.syntax).finish()
7674    }
7675}
7676impl AstNode for VariantList {
7677    #[inline]
7678    fn kind() -> SyntaxKind
7679    where
7680        Self: Sized,
7681    {
7682        VARIANT_LIST
7683    }
7684    #[inline]
7685    fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT_LIST }
7686    #[inline]
7687    fn cast(syntax: SyntaxNode) -> Option<Self> {
7688        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7689    }
7690    #[inline]
7691    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7692}
7693impl hash::Hash for VariantList {
7694    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7695}
7696impl Eq for VariantList {}
7697impl PartialEq for VariantList {
7698    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7699}
7700impl Clone for VariantList {
7701    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7702}
7703impl fmt::Debug for VariantList {
7704    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7705        f.debug_struct("VariantList").field("syntax", &self.syntax).finish()
7706    }
7707}
7708impl AstNode for Visibility {
7709    #[inline]
7710    fn kind() -> SyntaxKind
7711    where
7712        Self: Sized,
7713    {
7714        VISIBILITY
7715    }
7716    #[inline]
7717    fn can_cast(kind: SyntaxKind) -> bool { kind == VISIBILITY }
7718    #[inline]
7719    fn cast(syntax: SyntaxNode) -> Option<Self> {
7720        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7721    }
7722    #[inline]
7723    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7724}
7725impl hash::Hash for Visibility {
7726    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7727}
7728impl Eq for Visibility {}
7729impl PartialEq for Visibility {
7730    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7731}
7732impl Clone for Visibility {
7733    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7734}
7735impl fmt::Debug for Visibility {
7736    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7737        f.debug_struct("Visibility").field("syntax", &self.syntax).finish()
7738    }
7739}
7740impl AstNode for VisibilityInner {
7741    #[inline]
7742    fn kind() -> SyntaxKind
7743    where
7744        Self: Sized,
7745    {
7746        VISIBILITY_INNER
7747    }
7748    #[inline]
7749    fn can_cast(kind: SyntaxKind) -> bool { kind == VISIBILITY_INNER }
7750    #[inline]
7751    fn cast(syntax: SyntaxNode) -> Option<Self> {
7752        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7753    }
7754    #[inline]
7755    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7756}
7757impl hash::Hash for VisibilityInner {
7758    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7759}
7760impl Eq for VisibilityInner {}
7761impl PartialEq for VisibilityInner {
7762    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7763}
7764impl Clone for VisibilityInner {
7765    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7766}
7767impl fmt::Debug for VisibilityInner {
7768    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7769        f.debug_struct("VisibilityInner").field("syntax", &self.syntax).finish()
7770    }
7771}
7772impl AstNode for WhereClause {
7773    #[inline]
7774    fn kind() -> SyntaxKind
7775    where
7776        Self: Sized,
7777    {
7778        WHERE_CLAUSE
7779    }
7780    #[inline]
7781    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_CLAUSE }
7782    #[inline]
7783    fn cast(syntax: SyntaxNode) -> Option<Self> {
7784        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7785    }
7786    #[inline]
7787    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7788}
7789impl hash::Hash for WhereClause {
7790    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7791}
7792impl Eq for WhereClause {}
7793impl PartialEq for WhereClause {
7794    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7795}
7796impl Clone for WhereClause {
7797    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7798}
7799impl fmt::Debug for WhereClause {
7800    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7801        f.debug_struct("WhereClause").field("syntax", &self.syntax).finish()
7802    }
7803}
7804impl AstNode for WherePred {
7805    #[inline]
7806    fn kind() -> SyntaxKind
7807    where
7808        Self: Sized,
7809    {
7810        WHERE_PRED
7811    }
7812    #[inline]
7813    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED }
7814    #[inline]
7815    fn cast(syntax: SyntaxNode) -> Option<Self> {
7816        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7817    }
7818    #[inline]
7819    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7820}
7821impl hash::Hash for WherePred {
7822    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7823}
7824impl Eq for WherePred {}
7825impl PartialEq for WherePred {
7826    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7827}
7828impl Clone for WherePred {
7829    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7830}
7831impl fmt::Debug for WherePred {
7832    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7833        f.debug_struct("WherePred").field("syntax", &self.syntax).finish()
7834    }
7835}
7836impl AstNode for WhileExpr {
7837    #[inline]
7838    fn kind() -> SyntaxKind
7839    where
7840        Self: Sized,
7841    {
7842        WHILE_EXPR
7843    }
7844    #[inline]
7845    fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR }
7846    #[inline]
7847    fn cast(syntax: SyntaxNode) -> Option<Self> {
7848        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7849    }
7850    #[inline]
7851    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7852}
7853impl hash::Hash for WhileExpr {
7854    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7855}
7856impl Eq for WhileExpr {}
7857impl PartialEq for WhileExpr {
7858    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7859}
7860impl Clone for WhileExpr {
7861    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7862}
7863impl fmt::Debug for WhileExpr {
7864    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7865        f.debug_struct("WhileExpr").field("syntax", &self.syntax).finish()
7866    }
7867}
7868impl AstNode for WildcardPat {
7869    #[inline]
7870    fn kind() -> SyntaxKind
7871    where
7872        Self: Sized,
7873    {
7874        WILDCARD_PAT
7875    }
7876    #[inline]
7877    fn can_cast(kind: SyntaxKind) -> bool { kind == WILDCARD_PAT }
7878    #[inline]
7879    fn cast(syntax: SyntaxNode) -> Option<Self> {
7880        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7881    }
7882    #[inline]
7883    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7884}
7885impl hash::Hash for WildcardPat {
7886    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7887}
7888impl Eq for WildcardPat {}
7889impl PartialEq for WildcardPat {
7890    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7891}
7892impl Clone for WildcardPat {
7893    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7894}
7895impl fmt::Debug for WildcardPat {
7896    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7897        f.debug_struct("WildcardPat").field("syntax", &self.syntax).finish()
7898    }
7899}
7900impl AstNode for YeetExpr {
7901    #[inline]
7902    fn kind() -> SyntaxKind
7903    where
7904        Self: Sized,
7905    {
7906        YEET_EXPR
7907    }
7908    #[inline]
7909    fn can_cast(kind: SyntaxKind) -> bool { kind == YEET_EXPR }
7910    #[inline]
7911    fn cast(syntax: SyntaxNode) -> Option<Self> {
7912        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7913    }
7914    #[inline]
7915    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7916}
7917impl hash::Hash for YeetExpr {
7918    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7919}
7920impl Eq for YeetExpr {}
7921impl PartialEq for YeetExpr {
7922    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7923}
7924impl Clone for YeetExpr {
7925    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7926}
7927impl fmt::Debug for YeetExpr {
7928    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7929        f.debug_struct("YeetExpr").field("syntax", &self.syntax).finish()
7930    }
7931}
7932impl AstNode for YieldExpr {
7933    #[inline]
7934    fn kind() -> SyntaxKind
7935    where
7936        Self: Sized,
7937    {
7938        YIELD_EXPR
7939    }
7940    #[inline]
7941    fn can_cast(kind: SyntaxKind) -> bool { kind == YIELD_EXPR }
7942    #[inline]
7943    fn cast(syntax: SyntaxNode) -> Option<Self> {
7944        if Self::can_cast(syntax.kind()) { Some(Self { syntax }) } else { None }
7945    }
7946    #[inline]
7947    fn syntax(&self) -> &SyntaxNode { &self.syntax }
7948}
7949impl hash::Hash for YieldExpr {
7950    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
7951}
7952impl Eq for YieldExpr {}
7953impl PartialEq for YieldExpr {
7954    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
7955}
7956impl Clone for YieldExpr {
7957    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
7958}
7959impl fmt::Debug for YieldExpr {
7960    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7961        f.debug_struct("YieldExpr").field("syntax", &self.syntax).finish()
7962    }
7963}
7964impl From<Enum> for Adt {
7965    #[inline]
7966    fn from(node: Enum) -> Adt { Adt::Enum(node) }
7967}
7968impl From<Struct> for Adt {
7969    #[inline]
7970    fn from(node: Struct) -> Adt { Adt::Struct(node) }
7971}
7972impl From<Union> for Adt {
7973    #[inline]
7974    fn from(node: Union) -> Adt { Adt::Union(node) }
7975}
7976impl AstNode for Adt {
7977    #[inline]
7978    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ENUM | STRUCT | UNION) }
7979    #[inline]
7980    fn cast(syntax: SyntaxNode) -> Option<Self> {
7981        let res = match syntax.kind() {
7982            ENUM => Adt::Enum(Enum { syntax }),
7983            STRUCT => Adt::Struct(Struct { syntax }),
7984            UNION => Adt::Union(Union { syntax }),
7985            _ => return None,
7986        };
7987        Some(res)
7988    }
7989    #[inline]
7990    fn syntax(&self) -> &SyntaxNode {
7991        match self {
7992            Adt::Enum(it) => &it.syntax,
7993            Adt::Struct(it) => &it.syntax,
7994            Adt::Union(it) => &it.syntax,
7995        }
7996    }
7997}
7998impl From<Attr> for AnyAttr {
7999    #[inline]
8000    fn from(node: Attr) -> AnyAttr { AnyAttr::Attr(node) }
8001}
8002impl From<DocComment> for AnyAttr {
8003    #[inline]
8004    fn from(node: DocComment) -> AnyAttr { AnyAttr::DocComment(node) }
8005}
8006impl AstNode for AnyAttr {
8007    #[inline]
8008    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ATTR | DOC_COMMENT) }
8009    #[inline]
8010    fn cast(syntax: SyntaxNode) -> Option<Self> {
8011        let res = match syntax.kind() {
8012            ATTR => AnyAttr::Attr(Attr { syntax }),
8013            DOC_COMMENT => AnyAttr::DocComment(DocComment { syntax }),
8014            _ => return None,
8015        };
8016        Some(res)
8017    }
8018    #[inline]
8019    fn syntax(&self) -> &SyntaxNode {
8020        match self {
8021            AnyAttr::Attr(it) => &it.syntax,
8022            AnyAttr::DocComment(it) => &it.syntax,
8023        }
8024    }
8025}
8026impl From<AsmConst> for AsmOperand {
8027    #[inline]
8028    fn from(node: AsmConst) -> AsmOperand { AsmOperand::AsmConst(node) }
8029}
8030impl From<AsmLabel> for AsmOperand {
8031    #[inline]
8032    fn from(node: AsmLabel) -> AsmOperand { AsmOperand::AsmLabel(node) }
8033}
8034impl From<AsmRegOperand> for AsmOperand {
8035    #[inline]
8036    fn from(node: AsmRegOperand) -> AsmOperand { AsmOperand::AsmRegOperand(node) }
8037}
8038impl From<AsmSym> for AsmOperand {
8039    #[inline]
8040    fn from(node: AsmSym) -> AsmOperand { AsmOperand::AsmSym(node) }
8041}
8042impl AstNode for AsmOperand {
8043    #[inline]
8044    fn can_cast(kind: SyntaxKind) -> bool {
8045        matches!(kind, ASM_CONST | ASM_LABEL | ASM_REG_OPERAND | ASM_SYM)
8046    }
8047    #[inline]
8048    fn cast(syntax: SyntaxNode) -> Option<Self> {
8049        let res = match syntax.kind() {
8050            ASM_CONST => AsmOperand::AsmConst(AsmConst { syntax }),
8051            ASM_LABEL => AsmOperand::AsmLabel(AsmLabel { syntax }),
8052            ASM_REG_OPERAND => AsmOperand::AsmRegOperand(AsmRegOperand { syntax }),
8053            ASM_SYM => AsmOperand::AsmSym(AsmSym { syntax }),
8054            _ => return None,
8055        };
8056        Some(res)
8057    }
8058    #[inline]
8059    fn syntax(&self) -> &SyntaxNode {
8060        match self {
8061            AsmOperand::AsmConst(it) => &it.syntax,
8062            AsmOperand::AsmLabel(it) => &it.syntax,
8063            AsmOperand::AsmRegOperand(it) => &it.syntax,
8064            AsmOperand::AsmSym(it) => &it.syntax,
8065        }
8066    }
8067}
8068impl From<AsmClobberAbi> for AsmPiece {
8069    #[inline]
8070    fn from(node: AsmClobberAbi) -> AsmPiece { AsmPiece::AsmClobberAbi(node) }
8071}
8072impl From<AsmOperandNamed> for AsmPiece {
8073    #[inline]
8074    fn from(node: AsmOperandNamed) -> AsmPiece { AsmPiece::AsmOperandNamed(node) }
8075}
8076impl From<AsmOptions> for AsmPiece {
8077    #[inline]
8078    fn from(node: AsmOptions) -> AsmPiece { AsmPiece::AsmOptions(node) }
8079}
8080impl AstNode for AsmPiece {
8081    #[inline]
8082    fn can_cast(kind: SyntaxKind) -> bool {
8083        matches!(kind, ASM_CLOBBER_ABI | ASM_OPERAND_NAMED | ASM_OPTIONS)
8084    }
8085    #[inline]
8086    fn cast(syntax: SyntaxNode) -> Option<Self> {
8087        let res = match syntax.kind() {
8088            ASM_CLOBBER_ABI => AsmPiece::AsmClobberAbi(AsmClobberAbi { syntax }),
8089            ASM_OPERAND_NAMED => AsmPiece::AsmOperandNamed(AsmOperandNamed { syntax }),
8090            ASM_OPTIONS => AsmPiece::AsmOptions(AsmOptions { syntax }),
8091            _ => return None,
8092        };
8093        Some(res)
8094    }
8095    #[inline]
8096    fn syntax(&self) -> &SyntaxNode {
8097        match self {
8098            AsmPiece::AsmClobberAbi(it) => &it.syntax,
8099            AsmPiece::AsmOperandNamed(it) => &it.syntax,
8100            AsmPiece::AsmOptions(it) => &it.syntax,
8101        }
8102    }
8103}
8104impl From<Const> for AssocItem {
8105    #[inline]
8106    fn from(node: Const) -> AssocItem { AssocItem::Const(node) }
8107}
8108impl From<Fn> for AssocItem {
8109    #[inline]
8110    fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
8111}
8112impl From<MacroCall> for AssocItem {
8113    #[inline]
8114    fn from(node: MacroCall) -> AssocItem { AssocItem::MacroCall(node) }
8115}
8116impl From<TypeAlias> for AssocItem {
8117    #[inline]
8118    fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) }
8119}
8120impl AstNode for AssocItem {
8121    #[inline]
8122    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CONST | FN | MACRO_CALL | TYPE_ALIAS) }
8123    #[inline]
8124    fn cast(syntax: SyntaxNode) -> Option<Self> {
8125        let res = match syntax.kind() {
8126            CONST => AssocItem::Const(Const { syntax }),
8127            FN => AssocItem::Fn(Fn { syntax }),
8128            MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
8129            TYPE_ALIAS => AssocItem::TypeAlias(TypeAlias { syntax }),
8130            _ => return None,
8131        };
8132        Some(res)
8133    }
8134    #[inline]
8135    fn syntax(&self) -> &SyntaxNode {
8136        match self {
8137            AssocItem::Const(it) => &it.syntax,
8138            AssocItem::Fn(it) => &it.syntax,
8139            AssocItem::MacroCall(it) => &it.syntax,
8140            AssocItem::TypeAlias(it) => &it.syntax,
8141        }
8142    }
8143}
8144impl From<CfgAtom> for CfgPredicate {
8145    #[inline]
8146    fn from(node: CfgAtom) -> CfgPredicate { CfgPredicate::CfgAtom(node) }
8147}
8148impl From<CfgComposite> for CfgPredicate {
8149    #[inline]
8150    fn from(node: CfgComposite) -> CfgPredicate { CfgPredicate::CfgComposite(node) }
8151}
8152impl AstNode for CfgPredicate {
8153    #[inline]
8154    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CFG_ATOM | CFG_COMPOSITE) }
8155    #[inline]
8156    fn cast(syntax: SyntaxNode) -> Option<Self> {
8157        let res = match syntax.kind() {
8158            CFG_ATOM => CfgPredicate::CfgAtom(CfgAtom { syntax }),
8159            CFG_COMPOSITE => CfgPredicate::CfgComposite(CfgComposite { syntax }),
8160            _ => return None,
8161        };
8162        Some(res)
8163    }
8164    #[inline]
8165    fn syntax(&self) -> &SyntaxNode {
8166        match self {
8167            CfgPredicate::CfgAtom(it) => &it.syntax,
8168            CfgPredicate::CfgComposite(it) => &it.syntax,
8169        }
8170    }
8171}
8172impl From<ArrayExpr> for Expr {
8173    #[inline]
8174    fn from(node: ArrayExpr) -> Expr { Expr::ArrayExpr(node) }
8175}
8176impl From<AsmExpr> for Expr {
8177    #[inline]
8178    fn from(node: AsmExpr) -> Expr { Expr::AsmExpr(node) }
8179}
8180impl From<AwaitExpr> for Expr {
8181    #[inline]
8182    fn from(node: AwaitExpr) -> Expr { Expr::AwaitExpr(node) }
8183}
8184impl From<BecomeExpr> for Expr {
8185    #[inline]
8186    fn from(node: BecomeExpr) -> Expr { Expr::BecomeExpr(node) }
8187}
8188impl From<BinExpr> for Expr {
8189    #[inline]
8190    fn from(node: BinExpr) -> Expr { Expr::BinExpr(node) }
8191}
8192impl From<BlockExpr> for Expr {
8193    #[inline]
8194    fn from(node: BlockExpr) -> Expr { Expr::BlockExpr(node) }
8195}
8196impl From<BreakExpr> for Expr {
8197    #[inline]
8198    fn from(node: BreakExpr) -> Expr { Expr::BreakExpr(node) }
8199}
8200impl From<CallExpr> for Expr {
8201    #[inline]
8202    fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
8203}
8204impl From<CastExpr> for Expr {
8205    #[inline]
8206    fn from(node: CastExpr) -> Expr { Expr::CastExpr(node) }
8207}
8208impl From<CfgPredExpr> for Expr {
8209    #[inline]
8210    fn from(node: CfgPredExpr) -> Expr { Expr::CfgPredExpr(node) }
8211}
8212impl From<ClosureExpr> for Expr {
8213    #[inline]
8214    fn from(node: ClosureExpr) -> Expr { Expr::ClosureExpr(node) }
8215}
8216impl From<ContinueExpr> for Expr {
8217    #[inline]
8218    fn from(node: ContinueExpr) -> Expr { Expr::ContinueExpr(node) }
8219}
8220impl From<FieldExpr> for Expr {
8221    #[inline]
8222    fn from(node: FieldExpr) -> Expr { Expr::FieldExpr(node) }
8223}
8224impl From<ForExpr> for Expr {
8225    #[inline]
8226    fn from(node: ForExpr) -> Expr { Expr::ForExpr(node) }
8227}
8228impl From<FormatArgsExpr> for Expr {
8229    #[inline]
8230    fn from(node: FormatArgsExpr) -> Expr { Expr::FormatArgsExpr(node) }
8231}
8232impl From<IfExpr> for Expr {
8233    #[inline]
8234    fn from(node: IfExpr) -> Expr { Expr::IfExpr(node) }
8235}
8236impl From<IncludeBytesExpr> for Expr {
8237    #[inline]
8238    fn from(node: IncludeBytesExpr) -> Expr { Expr::IncludeBytesExpr(node) }
8239}
8240impl From<IndexExpr> for Expr {
8241    #[inline]
8242    fn from(node: IndexExpr) -> Expr { Expr::IndexExpr(node) }
8243}
8244impl From<LetExpr> for Expr {
8245    #[inline]
8246    fn from(node: LetExpr) -> Expr { Expr::LetExpr(node) }
8247}
8248impl From<Literal> for Expr {
8249    #[inline]
8250    fn from(node: Literal) -> Expr { Expr::Literal(node) }
8251}
8252impl From<LoopExpr> for Expr {
8253    #[inline]
8254    fn from(node: LoopExpr) -> Expr { Expr::LoopExpr(node) }
8255}
8256impl From<MacroExpr> for Expr {
8257    #[inline]
8258    fn from(node: MacroExpr) -> Expr { Expr::MacroExpr(node) }
8259}
8260impl From<MatchExpr> for Expr {
8261    #[inline]
8262    fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) }
8263}
8264impl From<MethodCallExpr> for Expr {
8265    #[inline]
8266    fn from(node: MethodCallExpr) -> Expr { Expr::MethodCallExpr(node) }
8267}
8268impl From<OffsetOfExpr> for Expr {
8269    #[inline]
8270    fn from(node: OffsetOfExpr) -> Expr { Expr::OffsetOfExpr(node) }
8271}
8272impl From<ParenExpr> for Expr {
8273    #[inline]
8274    fn from(node: ParenExpr) -> Expr { Expr::ParenExpr(node) }
8275}
8276impl From<PathExpr> for Expr {
8277    #[inline]
8278    fn from(node: PathExpr) -> Expr { Expr::PathExpr(node) }
8279}
8280impl From<PrefixExpr> for Expr {
8281    #[inline]
8282    fn from(node: PrefixExpr) -> Expr { Expr::PrefixExpr(node) }
8283}
8284impl From<RangeExpr> for Expr {
8285    #[inline]
8286    fn from(node: RangeExpr) -> Expr { Expr::RangeExpr(node) }
8287}
8288impl From<RecordExpr> for Expr {
8289    #[inline]
8290    fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) }
8291}
8292impl From<RefExpr> for Expr {
8293    #[inline]
8294    fn from(node: RefExpr) -> Expr { Expr::RefExpr(node) }
8295}
8296impl From<ReturnExpr> for Expr {
8297    #[inline]
8298    fn from(node: ReturnExpr) -> Expr { Expr::ReturnExpr(node) }
8299}
8300impl From<TryExpr> for Expr {
8301    #[inline]
8302    fn from(node: TryExpr) -> Expr { Expr::TryExpr(node) }
8303}
8304impl From<TupleExpr> for Expr {
8305    #[inline]
8306    fn from(node: TupleExpr) -> Expr { Expr::TupleExpr(node) }
8307}
8308impl From<UnderscoreExpr> for Expr {
8309    #[inline]
8310    fn from(node: UnderscoreExpr) -> Expr { Expr::UnderscoreExpr(node) }
8311}
8312impl From<WhileExpr> for Expr {
8313    #[inline]
8314    fn from(node: WhileExpr) -> Expr { Expr::WhileExpr(node) }
8315}
8316impl From<YeetExpr> for Expr {
8317    #[inline]
8318    fn from(node: YeetExpr) -> Expr { Expr::YeetExpr(node) }
8319}
8320impl From<YieldExpr> for Expr {
8321    #[inline]
8322    fn from(node: YieldExpr) -> Expr { Expr::YieldExpr(node) }
8323}
8324impl AstNode for Expr {
8325    #[inline]
8326    fn can_cast(kind: SyntaxKind) -> bool {
8327        matches!(
8328            kind,
8329            ARRAY_EXPR
8330                | ASM_EXPR
8331                | AWAIT_EXPR
8332                | BECOME_EXPR
8333                | BIN_EXPR
8334                | BLOCK_EXPR
8335                | BREAK_EXPR
8336                | CALL_EXPR
8337                | CAST_EXPR
8338                | CFG_PRED_EXPR
8339                | CLOSURE_EXPR
8340                | CONTINUE_EXPR
8341                | FIELD_EXPR
8342                | FOR_EXPR
8343                | FORMAT_ARGS_EXPR
8344                | IF_EXPR
8345                | INCLUDE_BYTES_EXPR
8346                | INDEX_EXPR
8347                | LET_EXPR
8348                | LITERAL
8349                | LOOP_EXPR
8350                | MACRO_EXPR
8351                | MATCH_EXPR
8352                | METHOD_CALL_EXPR
8353                | OFFSET_OF_EXPR
8354                | PAREN_EXPR
8355                | PATH_EXPR
8356                | PREFIX_EXPR
8357                | RANGE_EXPR
8358                | RECORD_EXPR
8359                | REF_EXPR
8360                | RETURN_EXPR
8361                | TRY_EXPR
8362                | TUPLE_EXPR
8363                | UNDERSCORE_EXPR
8364                | WHILE_EXPR
8365                | YEET_EXPR
8366                | YIELD_EXPR
8367        )
8368    }
8369    #[inline]
8370    fn cast(syntax: SyntaxNode) -> Option<Self> {
8371        let res = match syntax.kind() {
8372            ARRAY_EXPR => Expr::ArrayExpr(ArrayExpr { syntax }),
8373            ASM_EXPR => Expr::AsmExpr(AsmExpr { syntax }),
8374            AWAIT_EXPR => Expr::AwaitExpr(AwaitExpr { syntax }),
8375            BECOME_EXPR => Expr::BecomeExpr(BecomeExpr { syntax }),
8376            BIN_EXPR => Expr::BinExpr(BinExpr { syntax }),
8377            BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
8378            BREAK_EXPR => Expr::BreakExpr(BreakExpr { syntax }),
8379            CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
8380            CAST_EXPR => Expr::CastExpr(CastExpr { syntax }),
8381            CFG_PRED_EXPR => Expr::CfgPredExpr(CfgPredExpr { syntax }),
8382            CLOSURE_EXPR => Expr::ClosureExpr(ClosureExpr { syntax }),
8383            CONTINUE_EXPR => Expr::ContinueExpr(ContinueExpr { syntax }),
8384            FIELD_EXPR => Expr::FieldExpr(FieldExpr { syntax }),
8385            FOR_EXPR => Expr::ForExpr(ForExpr { syntax }),
8386            FORMAT_ARGS_EXPR => Expr::FormatArgsExpr(FormatArgsExpr { syntax }),
8387            IF_EXPR => Expr::IfExpr(IfExpr { syntax }),
8388            INCLUDE_BYTES_EXPR => Expr::IncludeBytesExpr(IncludeBytesExpr { syntax }),
8389            INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
8390            LET_EXPR => Expr::LetExpr(LetExpr { syntax }),
8391            LITERAL => Expr::Literal(Literal { syntax }),
8392            LOOP_EXPR => Expr::LoopExpr(LoopExpr { syntax }),
8393            MACRO_EXPR => Expr::MacroExpr(MacroExpr { syntax }),
8394            MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }),
8395            METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }),
8396            OFFSET_OF_EXPR => Expr::OffsetOfExpr(OffsetOfExpr { syntax }),
8397            PAREN_EXPR => Expr::ParenExpr(ParenExpr { syntax }),
8398            PATH_EXPR => Expr::PathExpr(PathExpr { syntax }),
8399            PREFIX_EXPR => Expr::PrefixExpr(PrefixExpr { syntax }),
8400            RANGE_EXPR => Expr::RangeExpr(RangeExpr { syntax }),
8401            RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }),
8402            REF_EXPR => Expr::RefExpr(RefExpr { syntax }),
8403            RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
8404            TRY_EXPR => Expr::TryExpr(TryExpr { syntax }),
8405            TUPLE_EXPR => Expr::TupleExpr(TupleExpr { syntax }),
8406            UNDERSCORE_EXPR => Expr::UnderscoreExpr(UnderscoreExpr { syntax }),
8407            WHILE_EXPR => Expr::WhileExpr(WhileExpr { syntax }),
8408            YEET_EXPR => Expr::YeetExpr(YeetExpr { syntax }),
8409            YIELD_EXPR => Expr::YieldExpr(YieldExpr { syntax }),
8410            _ => return None,
8411        };
8412        Some(res)
8413    }
8414    #[inline]
8415    fn syntax(&self) -> &SyntaxNode {
8416        match self {
8417            Expr::ArrayExpr(it) => &it.syntax,
8418            Expr::AsmExpr(it) => &it.syntax,
8419            Expr::AwaitExpr(it) => &it.syntax,
8420            Expr::BecomeExpr(it) => &it.syntax,
8421            Expr::BinExpr(it) => &it.syntax,
8422            Expr::BlockExpr(it) => &it.syntax,
8423            Expr::BreakExpr(it) => &it.syntax,
8424            Expr::CallExpr(it) => &it.syntax,
8425            Expr::CastExpr(it) => &it.syntax,
8426            Expr::CfgPredExpr(it) => &it.syntax,
8427            Expr::ClosureExpr(it) => &it.syntax,
8428            Expr::ContinueExpr(it) => &it.syntax,
8429            Expr::FieldExpr(it) => &it.syntax,
8430            Expr::ForExpr(it) => &it.syntax,
8431            Expr::FormatArgsExpr(it) => &it.syntax,
8432            Expr::IfExpr(it) => &it.syntax,
8433            Expr::IncludeBytesExpr(it) => &it.syntax,
8434            Expr::IndexExpr(it) => &it.syntax,
8435            Expr::LetExpr(it) => &it.syntax,
8436            Expr::Literal(it) => &it.syntax,
8437            Expr::LoopExpr(it) => &it.syntax,
8438            Expr::MacroExpr(it) => &it.syntax,
8439            Expr::MatchExpr(it) => &it.syntax,
8440            Expr::MethodCallExpr(it) => &it.syntax,
8441            Expr::OffsetOfExpr(it) => &it.syntax,
8442            Expr::ParenExpr(it) => &it.syntax,
8443            Expr::PathExpr(it) => &it.syntax,
8444            Expr::PrefixExpr(it) => &it.syntax,
8445            Expr::RangeExpr(it) => &it.syntax,
8446            Expr::RecordExpr(it) => &it.syntax,
8447            Expr::RefExpr(it) => &it.syntax,
8448            Expr::ReturnExpr(it) => &it.syntax,
8449            Expr::TryExpr(it) => &it.syntax,
8450            Expr::TupleExpr(it) => &it.syntax,
8451            Expr::UnderscoreExpr(it) => &it.syntax,
8452            Expr::WhileExpr(it) => &it.syntax,
8453            Expr::YeetExpr(it) => &it.syntax,
8454            Expr::YieldExpr(it) => &it.syntax,
8455        }
8456    }
8457}
8458impl From<Fn> for ExternItem {
8459    #[inline]
8460    fn from(node: Fn) -> ExternItem { ExternItem::Fn(node) }
8461}
8462impl From<MacroCall> for ExternItem {
8463    #[inline]
8464    fn from(node: MacroCall) -> ExternItem { ExternItem::MacroCall(node) }
8465}
8466impl From<Static> for ExternItem {
8467    #[inline]
8468    fn from(node: Static) -> ExternItem { ExternItem::Static(node) }
8469}
8470impl From<TypeAlias> for ExternItem {
8471    #[inline]
8472    fn from(node: TypeAlias) -> ExternItem { ExternItem::TypeAlias(node) }
8473}
8474impl AstNode for ExternItem {
8475    #[inline]
8476    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, FN | MACRO_CALL | STATIC | TYPE_ALIAS) }
8477    #[inline]
8478    fn cast(syntax: SyntaxNode) -> Option<Self> {
8479        let res = match syntax.kind() {
8480            FN => ExternItem::Fn(Fn { syntax }),
8481            MACRO_CALL => ExternItem::MacroCall(MacroCall { syntax }),
8482            STATIC => ExternItem::Static(Static { syntax }),
8483            TYPE_ALIAS => ExternItem::TypeAlias(TypeAlias { syntax }),
8484            _ => return None,
8485        };
8486        Some(res)
8487    }
8488    #[inline]
8489    fn syntax(&self) -> &SyntaxNode {
8490        match self {
8491            ExternItem::Fn(it) => &it.syntax,
8492            ExternItem::MacroCall(it) => &it.syntax,
8493            ExternItem::Static(it) => &it.syntax,
8494            ExternItem::TypeAlias(it) => &it.syntax,
8495        }
8496    }
8497}
8498impl From<RecordFieldList> for FieldList {
8499    #[inline]
8500    fn from(node: RecordFieldList) -> FieldList { FieldList::RecordFieldList(node) }
8501}
8502impl From<TupleFieldList> for FieldList {
8503    #[inline]
8504    fn from(node: TupleFieldList) -> FieldList { FieldList::TupleFieldList(node) }
8505}
8506impl AstNode for FieldList {
8507    #[inline]
8508    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, RECORD_FIELD_LIST | TUPLE_FIELD_LIST) }
8509    #[inline]
8510    fn cast(syntax: SyntaxNode) -> Option<Self> {
8511        let res = match syntax.kind() {
8512            RECORD_FIELD_LIST => FieldList::RecordFieldList(RecordFieldList { syntax }),
8513            TUPLE_FIELD_LIST => FieldList::TupleFieldList(TupleFieldList { syntax }),
8514            _ => return None,
8515        };
8516        Some(res)
8517    }
8518    #[inline]
8519    fn syntax(&self) -> &SyntaxNode {
8520        match self {
8521            FieldList::RecordFieldList(it) => &it.syntax,
8522            FieldList::TupleFieldList(it) => &it.syntax,
8523        }
8524    }
8525}
8526impl From<AssocTypeArg> for GenericArg {
8527    #[inline]
8528    fn from(node: AssocTypeArg) -> GenericArg { GenericArg::AssocTypeArg(node) }
8529}
8530impl From<ConstArg> for GenericArg {
8531    #[inline]
8532    fn from(node: ConstArg) -> GenericArg { GenericArg::ConstArg(node) }
8533}
8534impl From<LifetimeArg> for GenericArg {
8535    #[inline]
8536    fn from(node: LifetimeArg) -> GenericArg { GenericArg::LifetimeArg(node) }
8537}
8538impl From<TypeArg> for GenericArg {
8539    #[inline]
8540    fn from(node: TypeArg) -> GenericArg { GenericArg::TypeArg(node) }
8541}
8542impl AstNode for GenericArg {
8543    #[inline]
8544    fn can_cast(kind: SyntaxKind) -> bool {
8545        matches!(kind, ASSOC_TYPE_ARG | CONST_ARG | LIFETIME_ARG | TYPE_ARG)
8546    }
8547    #[inline]
8548    fn cast(syntax: SyntaxNode) -> Option<Self> {
8549        let res = match syntax.kind() {
8550            ASSOC_TYPE_ARG => GenericArg::AssocTypeArg(AssocTypeArg { syntax }),
8551            CONST_ARG => GenericArg::ConstArg(ConstArg { syntax }),
8552            LIFETIME_ARG => GenericArg::LifetimeArg(LifetimeArg { syntax }),
8553            TYPE_ARG => GenericArg::TypeArg(TypeArg { syntax }),
8554            _ => return None,
8555        };
8556        Some(res)
8557    }
8558    #[inline]
8559    fn syntax(&self) -> &SyntaxNode {
8560        match self {
8561            GenericArg::AssocTypeArg(it) => &it.syntax,
8562            GenericArg::ConstArg(it) => &it.syntax,
8563            GenericArg::LifetimeArg(it) => &it.syntax,
8564            GenericArg::TypeArg(it) => &it.syntax,
8565        }
8566    }
8567}
8568impl From<ConstParam> for GenericParam {
8569    #[inline]
8570    fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) }
8571}
8572impl From<LifetimeParam> for GenericParam {
8573    #[inline]
8574    fn from(node: LifetimeParam) -> GenericParam { GenericParam::LifetimeParam(node) }
8575}
8576impl From<TypeParam> for GenericParam {
8577    #[inline]
8578    fn from(node: TypeParam) -> GenericParam { GenericParam::TypeParam(node) }
8579}
8580impl AstNode for GenericParam {
8581    #[inline]
8582    fn can_cast(kind: SyntaxKind) -> bool {
8583        matches!(kind, CONST_PARAM | LIFETIME_PARAM | TYPE_PARAM)
8584    }
8585    #[inline]
8586    fn cast(syntax: SyntaxNode) -> Option<Self> {
8587        let res = match syntax.kind() {
8588            CONST_PARAM => GenericParam::ConstParam(ConstParam { syntax }),
8589            LIFETIME_PARAM => GenericParam::LifetimeParam(LifetimeParam { syntax }),
8590            TYPE_PARAM => GenericParam::TypeParam(TypeParam { syntax }),
8591            _ => return None,
8592        };
8593        Some(res)
8594    }
8595    #[inline]
8596    fn syntax(&self) -> &SyntaxNode {
8597        match self {
8598            GenericParam::ConstParam(it) => &it.syntax,
8599            GenericParam::LifetimeParam(it) => &it.syntax,
8600            GenericParam::TypeParam(it) => &it.syntax,
8601        }
8602    }
8603}
8604impl From<AsmExpr> for Item {
8605    #[inline]
8606    fn from(node: AsmExpr) -> Item { Item::AsmExpr(node) }
8607}
8608impl From<Const> for Item {
8609    #[inline]
8610    fn from(node: Const) -> Item { Item::Const(node) }
8611}
8612impl From<Enum> for Item {
8613    #[inline]
8614    fn from(node: Enum) -> Item { Item::Enum(node) }
8615}
8616impl From<ExternBlock> for Item {
8617    #[inline]
8618    fn from(node: ExternBlock) -> Item { Item::ExternBlock(node) }
8619}
8620impl From<ExternCrate> for Item {
8621    #[inline]
8622    fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) }
8623}
8624impl From<Fn> for Item {
8625    #[inline]
8626    fn from(node: Fn) -> Item { Item::Fn(node) }
8627}
8628impl From<Impl> for Item {
8629    #[inline]
8630    fn from(node: Impl) -> Item { Item::Impl(node) }
8631}
8632impl From<MacroCall> for Item {
8633    #[inline]
8634    fn from(node: MacroCall) -> Item { Item::MacroCall(node) }
8635}
8636impl From<MacroDef> for Item {
8637    #[inline]
8638    fn from(node: MacroDef) -> Item { Item::MacroDef(node) }
8639}
8640impl From<MacroRules> for Item {
8641    #[inline]
8642    fn from(node: MacroRules) -> Item { Item::MacroRules(node) }
8643}
8644impl From<Module> for Item {
8645    #[inline]
8646    fn from(node: Module) -> Item { Item::Module(node) }
8647}
8648impl From<Static> for Item {
8649    #[inline]
8650    fn from(node: Static) -> Item { Item::Static(node) }
8651}
8652impl From<Struct> for Item {
8653    #[inline]
8654    fn from(node: Struct) -> Item { Item::Struct(node) }
8655}
8656impl From<Trait> for Item {
8657    #[inline]
8658    fn from(node: Trait) -> Item { Item::Trait(node) }
8659}
8660impl From<TypeAlias> for Item {
8661    #[inline]
8662    fn from(node: TypeAlias) -> Item { Item::TypeAlias(node) }
8663}
8664impl From<Union> for Item {
8665    #[inline]
8666    fn from(node: Union) -> Item { Item::Union(node) }
8667}
8668impl From<Use> for Item {
8669    #[inline]
8670    fn from(node: Use) -> Item { Item::Use(node) }
8671}
8672impl AstNode for Item {
8673    #[inline]
8674    fn can_cast(kind: SyntaxKind) -> bool {
8675        matches!(
8676            kind,
8677            ASM_EXPR
8678                | CONST
8679                | ENUM
8680                | EXTERN_BLOCK
8681                | EXTERN_CRATE
8682                | FN
8683                | IMPL
8684                | MACRO_CALL
8685                | MACRO_DEF
8686                | MACRO_RULES
8687                | MODULE
8688                | STATIC
8689                | STRUCT
8690                | TRAIT
8691                | TYPE_ALIAS
8692                | UNION
8693                | USE
8694        )
8695    }
8696    #[inline]
8697    fn cast(syntax: SyntaxNode) -> Option<Self> {
8698        let res = match syntax.kind() {
8699            ASM_EXPR => Item::AsmExpr(AsmExpr { syntax }),
8700            CONST => Item::Const(Const { syntax }),
8701            ENUM => Item::Enum(Enum { syntax }),
8702            EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }),
8703            EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }),
8704            FN => Item::Fn(Fn { syntax }),
8705            IMPL => Item::Impl(Impl { syntax }),
8706            MACRO_CALL => Item::MacroCall(MacroCall { syntax }),
8707            MACRO_DEF => Item::MacroDef(MacroDef { syntax }),
8708            MACRO_RULES => Item::MacroRules(MacroRules { syntax }),
8709            MODULE => Item::Module(Module { syntax }),
8710            STATIC => Item::Static(Static { syntax }),
8711            STRUCT => Item::Struct(Struct { syntax }),
8712            TRAIT => Item::Trait(Trait { syntax }),
8713            TYPE_ALIAS => Item::TypeAlias(TypeAlias { syntax }),
8714            UNION => Item::Union(Union { syntax }),
8715            USE => Item::Use(Use { syntax }),
8716            _ => return None,
8717        };
8718        Some(res)
8719    }
8720    #[inline]
8721    fn syntax(&self) -> &SyntaxNode {
8722        match self {
8723            Item::AsmExpr(it) => &it.syntax,
8724            Item::Const(it) => &it.syntax,
8725            Item::Enum(it) => &it.syntax,
8726            Item::ExternBlock(it) => &it.syntax,
8727            Item::ExternCrate(it) => &it.syntax,
8728            Item::Fn(it) => &it.syntax,
8729            Item::Impl(it) => &it.syntax,
8730            Item::MacroCall(it) => &it.syntax,
8731            Item::MacroDef(it) => &it.syntax,
8732            Item::MacroRules(it) => &it.syntax,
8733            Item::Module(it) => &it.syntax,
8734            Item::Static(it) => &it.syntax,
8735            Item::Struct(it) => &it.syntax,
8736            Item::Trait(it) => &it.syntax,
8737            Item::TypeAlias(it) => &it.syntax,
8738            Item::Union(it) => &it.syntax,
8739            Item::Use(it) => &it.syntax,
8740        }
8741    }
8742}
8743impl From<CfgAttrMeta> for Meta {
8744    #[inline]
8745    fn from(node: CfgAttrMeta) -> Meta { Meta::CfgAttrMeta(node) }
8746}
8747impl From<CfgMeta> for Meta {
8748    #[inline]
8749    fn from(node: CfgMeta) -> Meta { Meta::CfgMeta(node) }
8750}
8751impl From<KeyValueMeta> for Meta {
8752    #[inline]
8753    fn from(node: KeyValueMeta) -> Meta { Meta::KeyValueMeta(node) }
8754}
8755impl From<PathMeta> for Meta {
8756    #[inline]
8757    fn from(node: PathMeta) -> Meta { Meta::PathMeta(node) }
8758}
8759impl From<TokenTreeMeta> for Meta {
8760    #[inline]
8761    fn from(node: TokenTreeMeta) -> Meta { Meta::TokenTreeMeta(node) }
8762}
8763impl From<UnsafeMeta> for Meta {
8764    #[inline]
8765    fn from(node: UnsafeMeta) -> Meta { Meta::UnsafeMeta(node) }
8766}
8767impl AstNode for Meta {
8768    #[inline]
8769    fn can_cast(kind: SyntaxKind) -> bool {
8770        matches!(
8771            kind,
8772            CFG_ATTR_META | CFG_META | KEY_VALUE_META | PATH_META | TOKEN_TREE_META | UNSAFE_META
8773        )
8774    }
8775    #[inline]
8776    fn cast(syntax: SyntaxNode) -> Option<Self> {
8777        let res = match syntax.kind() {
8778            CFG_ATTR_META => Meta::CfgAttrMeta(CfgAttrMeta { syntax }),
8779            CFG_META => Meta::CfgMeta(CfgMeta { syntax }),
8780            KEY_VALUE_META => Meta::KeyValueMeta(KeyValueMeta { syntax }),
8781            PATH_META => Meta::PathMeta(PathMeta { syntax }),
8782            TOKEN_TREE_META => Meta::TokenTreeMeta(TokenTreeMeta { syntax }),
8783            UNSAFE_META => Meta::UnsafeMeta(UnsafeMeta { syntax }),
8784            _ => return None,
8785        };
8786        Some(res)
8787    }
8788    #[inline]
8789    fn syntax(&self) -> &SyntaxNode {
8790        match self {
8791            Meta::CfgAttrMeta(it) => &it.syntax,
8792            Meta::CfgMeta(it) => &it.syntax,
8793            Meta::KeyValueMeta(it) => &it.syntax,
8794            Meta::PathMeta(it) => &it.syntax,
8795            Meta::TokenTreeMeta(it) => &it.syntax,
8796            Meta::UnsafeMeta(it) => &it.syntax,
8797        }
8798    }
8799}
8800impl From<BoxPat> for Pat {
8801    #[inline]
8802    fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
8803}
8804impl From<CfgPredPat> for Pat {
8805    #[inline]
8806    fn from(node: CfgPredPat) -> Pat { Pat::CfgPredPat(node) }
8807}
8808impl From<ConstBlockPat> for Pat {
8809    #[inline]
8810    fn from(node: ConstBlockPat) -> Pat { Pat::ConstBlockPat(node) }
8811}
8812impl From<DerefPat> for Pat {
8813    #[inline]
8814    fn from(node: DerefPat) -> Pat { Pat::DerefPat(node) }
8815}
8816impl From<IdentPat> for Pat {
8817    #[inline]
8818    fn from(node: IdentPat) -> Pat { Pat::IdentPat(node) }
8819}
8820impl From<LiteralPat> for Pat {
8821    #[inline]
8822    fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
8823}
8824impl From<MacroPat> for Pat {
8825    #[inline]
8826    fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) }
8827}
8828impl From<NotNull> for Pat {
8829    #[inline]
8830    fn from(node: NotNull) -> Pat { Pat::NotNull(node) }
8831}
8832impl From<OrPat> for Pat {
8833    #[inline]
8834    fn from(node: OrPat) -> Pat { Pat::OrPat(node) }
8835}
8836impl From<ParenPat> for Pat {
8837    #[inline]
8838    fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) }
8839}
8840impl From<PathPat> for Pat {
8841    #[inline]
8842    fn from(node: PathPat) -> Pat { Pat::PathPat(node) }
8843}
8844impl From<RangePat> for Pat {
8845    #[inline]
8846    fn from(node: RangePat) -> Pat { Pat::RangePat(node) }
8847}
8848impl From<RecordPat> for Pat {
8849    #[inline]
8850    fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) }
8851}
8852impl From<RefPat> for Pat {
8853    #[inline]
8854    fn from(node: RefPat) -> Pat { Pat::RefPat(node) }
8855}
8856impl From<RestPat> for Pat {
8857    #[inline]
8858    fn from(node: RestPat) -> Pat { Pat::RestPat(node) }
8859}
8860impl From<SlicePat> for Pat {
8861    #[inline]
8862    fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) }
8863}
8864impl From<TuplePat> for Pat {
8865    #[inline]
8866    fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) }
8867}
8868impl From<TupleStructPat> for Pat {
8869    #[inline]
8870    fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) }
8871}
8872impl From<WildcardPat> for Pat {
8873    #[inline]
8874    fn from(node: WildcardPat) -> Pat { Pat::WildcardPat(node) }
8875}
8876impl AstNode for Pat {
8877    #[inline]
8878    fn can_cast(kind: SyntaxKind) -> bool {
8879        matches!(
8880            kind,
8881            BOX_PAT
8882                | CFG_PRED_PAT
8883                | CONST_BLOCK_PAT
8884                | DEREF_PAT
8885                | IDENT_PAT
8886                | LITERAL_PAT
8887                | MACRO_PAT
8888                | NOT_NULL
8889                | OR_PAT
8890                | PAREN_PAT
8891                | PATH_PAT
8892                | RANGE_PAT
8893                | RECORD_PAT
8894                | REF_PAT
8895                | REST_PAT
8896                | SLICE_PAT
8897                | TUPLE_PAT
8898                | TUPLE_STRUCT_PAT
8899                | WILDCARD_PAT
8900        )
8901    }
8902    #[inline]
8903    fn cast(syntax: SyntaxNode) -> Option<Self> {
8904        let res = match syntax.kind() {
8905            BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
8906            CFG_PRED_PAT => Pat::CfgPredPat(CfgPredPat { syntax }),
8907            CONST_BLOCK_PAT => Pat::ConstBlockPat(ConstBlockPat { syntax }),
8908            DEREF_PAT => Pat::DerefPat(DerefPat { syntax }),
8909            IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
8910            LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
8911            MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
8912            NOT_NULL => Pat::NotNull(NotNull { syntax }),
8913            OR_PAT => Pat::OrPat(OrPat { syntax }),
8914            PAREN_PAT => Pat::ParenPat(ParenPat { syntax }),
8915            PATH_PAT => Pat::PathPat(PathPat { syntax }),
8916            RANGE_PAT => Pat::RangePat(RangePat { syntax }),
8917            RECORD_PAT => Pat::RecordPat(RecordPat { syntax }),
8918            REF_PAT => Pat::RefPat(RefPat { syntax }),
8919            REST_PAT => Pat::RestPat(RestPat { syntax }),
8920            SLICE_PAT => Pat::SlicePat(SlicePat { syntax }),
8921            TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }),
8922            TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }),
8923            WILDCARD_PAT => Pat::WildcardPat(WildcardPat { syntax }),
8924            _ => return None,
8925        };
8926        Some(res)
8927    }
8928    #[inline]
8929    fn syntax(&self) -> &SyntaxNode {
8930        match self {
8931            Pat::BoxPat(it) => &it.syntax,
8932            Pat::CfgPredPat(it) => &it.syntax,
8933            Pat::ConstBlockPat(it) => &it.syntax,
8934            Pat::DerefPat(it) => &it.syntax,
8935            Pat::IdentPat(it) => &it.syntax,
8936            Pat::LiteralPat(it) => &it.syntax,
8937            Pat::MacroPat(it) => &it.syntax,
8938            Pat::NotNull(it) => &it.syntax,
8939            Pat::OrPat(it) => &it.syntax,
8940            Pat::ParenPat(it) => &it.syntax,
8941            Pat::PathPat(it) => &it.syntax,
8942            Pat::RangePat(it) => &it.syntax,
8943            Pat::RecordPat(it) => &it.syntax,
8944            Pat::RefPat(it) => &it.syntax,
8945            Pat::RestPat(it) => &it.syntax,
8946            Pat::SlicePat(it) => &it.syntax,
8947            Pat::TuplePat(it) => &it.syntax,
8948            Pat::TupleStructPat(it) => &it.syntax,
8949            Pat::WildcardPat(it) => &it.syntax,
8950        }
8951    }
8952}
8953impl From<ExprStmt> for Stmt {
8954    #[inline]
8955    fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) }
8956}
8957impl From<Item> for Stmt {
8958    #[inline]
8959    fn from(node: Item) -> Stmt { Stmt::Item(node) }
8960}
8961impl From<LetStmt> for Stmt {
8962    #[inline]
8963    fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
8964}
8965impl From<ArrayType> for Type {
8966    #[inline]
8967    fn from(node: ArrayType) -> Type { Type::ArrayType(node) }
8968}
8969impl From<DynTraitType> for Type {
8970    #[inline]
8971    fn from(node: DynTraitType) -> Type { Type::DynTraitType(node) }
8972}
8973impl From<FnPtrType> for Type {
8974    #[inline]
8975    fn from(node: FnPtrType) -> Type { Type::FnPtrType(node) }
8976}
8977impl From<ForType> for Type {
8978    #[inline]
8979    fn from(node: ForType) -> Type { Type::ForType(node) }
8980}
8981impl From<ImplTraitType> for Type {
8982    #[inline]
8983    fn from(node: ImplTraitType) -> Type { Type::ImplTraitType(node) }
8984}
8985impl From<InferType> for Type {
8986    #[inline]
8987    fn from(node: InferType) -> Type { Type::InferType(node) }
8988}
8989impl From<MacroType> for Type {
8990    #[inline]
8991    fn from(node: MacroType) -> Type { Type::MacroType(node) }
8992}
8993impl From<NeverType> for Type {
8994    #[inline]
8995    fn from(node: NeverType) -> Type { Type::NeverType(node) }
8996}
8997impl From<ParenType> for Type {
8998    #[inline]
8999    fn from(node: ParenType) -> Type { Type::ParenType(node) }
9000}
9001impl From<PathType> for Type {
9002    #[inline]
9003    fn from(node: PathType) -> Type { Type::PathType(node) }
9004}
9005impl From<PatternType> for Type {
9006    #[inline]
9007    fn from(node: PatternType) -> Type { Type::PatternType(node) }
9008}
9009impl From<PtrType> for Type {
9010    #[inline]
9011    fn from(node: PtrType) -> Type { Type::PtrType(node) }
9012}
9013impl From<RefType> for Type {
9014    #[inline]
9015    fn from(node: RefType) -> Type { Type::RefType(node) }
9016}
9017impl From<SliceType> for Type {
9018    #[inline]
9019    fn from(node: SliceType) -> Type { Type::SliceType(node) }
9020}
9021impl From<TupleType> for Type {
9022    #[inline]
9023    fn from(node: TupleType) -> Type { Type::TupleType(node) }
9024}
9025impl AstNode for Type {
9026    #[inline]
9027    fn can_cast(kind: SyntaxKind) -> bool {
9028        matches!(
9029            kind,
9030            ARRAY_TYPE
9031                | DYN_TRAIT_TYPE
9032                | FN_PTR_TYPE
9033                | FOR_TYPE
9034                | IMPL_TRAIT_TYPE
9035                | INFER_TYPE
9036                | MACRO_TYPE
9037                | NEVER_TYPE
9038                | PAREN_TYPE
9039                | PATH_TYPE
9040                | PATTERN_TYPE
9041                | PTR_TYPE
9042                | REF_TYPE
9043                | SLICE_TYPE
9044                | TUPLE_TYPE
9045        )
9046    }
9047    #[inline]
9048    fn cast(syntax: SyntaxNode) -> Option<Self> {
9049        let res = match syntax.kind() {
9050            ARRAY_TYPE => Type::ArrayType(ArrayType { syntax }),
9051            DYN_TRAIT_TYPE => Type::DynTraitType(DynTraitType { syntax }),
9052            FN_PTR_TYPE => Type::FnPtrType(FnPtrType { syntax }),
9053            FOR_TYPE => Type::ForType(ForType { syntax }),
9054            IMPL_TRAIT_TYPE => Type::ImplTraitType(ImplTraitType { syntax }),
9055            INFER_TYPE => Type::InferType(InferType { syntax }),
9056            MACRO_TYPE => Type::MacroType(MacroType { syntax }),
9057            NEVER_TYPE => Type::NeverType(NeverType { syntax }),
9058            PAREN_TYPE => Type::ParenType(ParenType { syntax }),
9059            PATH_TYPE => Type::PathType(PathType { syntax }),
9060            PATTERN_TYPE => Type::PatternType(PatternType { syntax }),
9061            PTR_TYPE => Type::PtrType(PtrType { syntax }),
9062            REF_TYPE => Type::RefType(RefType { syntax }),
9063            SLICE_TYPE => Type::SliceType(SliceType { syntax }),
9064            TUPLE_TYPE => Type::TupleType(TupleType { syntax }),
9065            _ => return None,
9066        };
9067        Some(res)
9068    }
9069    #[inline]
9070    fn syntax(&self) -> &SyntaxNode {
9071        match self {
9072            Type::ArrayType(it) => &it.syntax,
9073            Type::DynTraitType(it) => &it.syntax,
9074            Type::FnPtrType(it) => &it.syntax,
9075            Type::ForType(it) => &it.syntax,
9076            Type::ImplTraitType(it) => &it.syntax,
9077            Type::InferType(it) => &it.syntax,
9078            Type::MacroType(it) => &it.syntax,
9079            Type::NeverType(it) => &it.syntax,
9080            Type::ParenType(it) => &it.syntax,
9081            Type::PathType(it) => &it.syntax,
9082            Type::PatternType(it) => &it.syntax,
9083            Type::PtrType(it) => &it.syntax,
9084            Type::RefType(it) => &it.syntax,
9085            Type::SliceType(it) => &it.syntax,
9086            Type::TupleType(it) => &it.syntax,
9087        }
9088    }
9089}
9090impl From<Lifetime> for UseBoundGenericArg {
9091    #[inline]
9092    fn from(node: Lifetime) -> UseBoundGenericArg { UseBoundGenericArg::Lifetime(node) }
9093}
9094impl From<NameRef> for UseBoundGenericArg {
9095    #[inline]
9096    fn from(node: NameRef) -> UseBoundGenericArg { UseBoundGenericArg::NameRef(node) }
9097}
9098impl AstNode for UseBoundGenericArg {
9099    #[inline]
9100    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, LIFETIME | NAME_REF) }
9101    #[inline]
9102    fn cast(syntax: SyntaxNode) -> Option<Self> {
9103        let res = match syntax.kind() {
9104            LIFETIME => UseBoundGenericArg::Lifetime(Lifetime { syntax }),
9105            NAME_REF => UseBoundGenericArg::NameRef(NameRef { syntax }),
9106            _ => return None,
9107        };
9108        Some(res)
9109    }
9110    #[inline]
9111    fn syntax(&self) -> &SyntaxNode {
9112        match self {
9113            UseBoundGenericArg::Lifetime(it) => &it.syntax,
9114            UseBoundGenericArg::NameRef(it) => &it.syntax,
9115        }
9116    }
9117}
9118impl From<Struct> for VariantDef {
9119    #[inline]
9120    fn from(node: Struct) -> VariantDef { VariantDef::Struct(node) }
9121}
9122impl From<Union> for VariantDef {
9123    #[inline]
9124    fn from(node: Union) -> VariantDef { VariantDef::Union(node) }
9125}
9126impl From<Variant> for VariantDef {
9127    #[inline]
9128    fn from(node: Variant) -> VariantDef { VariantDef::Variant(node) }
9129}
9130impl AstNode for VariantDef {
9131    #[inline]
9132    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, STRUCT | UNION | VARIANT) }
9133    #[inline]
9134    fn cast(syntax: SyntaxNode) -> Option<Self> {
9135        let res = match syntax.kind() {
9136            STRUCT => VariantDef::Struct(Struct { syntax }),
9137            UNION => VariantDef::Union(Union { syntax }),
9138            VARIANT => VariantDef::Variant(Variant { syntax }),
9139            _ => return None,
9140        };
9141        Some(res)
9142    }
9143    #[inline]
9144    fn syntax(&self) -> &SyntaxNode {
9145        match self {
9146            VariantDef::Struct(it) => &it.syntax,
9147            VariantDef::Union(it) => &it.syntax,
9148            VariantDef::Variant(it) => &it.syntax,
9149        }
9150    }
9151}
9152impl ast::HasArgList for AnyHasArgList {}
9153impl AstNode for AnyHasArgList {
9154    #[inline]
9155    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, CALL_EXPR | METHOD_CALL_EXPR) }
9156    #[inline]
9157    fn cast(syntax: SyntaxNode) -> Option<Self> {
9158        Self::can_cast(syntax.kind()).then_some(AnyHasArgList { syntax })
9159    }
9160    #[inline]
9161    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9162}
9163impl hash::Hash for AnyHasArgList {
9164    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9165}
9166impl Eq for AnyHasArgList {}
9167impl PartialEq for AnyHasArgList {
9168    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9169}
9170impl Clone for AnyHasArgList {
9171    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9172}
9173impl fmt::Debug for AnyHasArgList {
9174    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9175        f.debug_struct("AnyHasArgList").field("syntax", &self.syntax).finish()
9176    }
9177}
9178impl From<CallExpr> for AnyHasArgList {
9179    #[inline]
9180    fn from(node: CallExpr) -> AnyHasArgList { AnyHasArgList { syntax: node.syntax } }
9181}
9182impl From<MethodCallExpr> for AnyHasArgList {
9183    #[inline]
9184    fn from(node: MethodCallExpr) -> AnyHasArgList { AnyHasArgList { syntax: node.syntax } }
9185}
9186impl ast::HasAttrs for AnyHasAttrs {}
9187impl AstNode for AnyHasAttrs {
9188    #[inline]
9189    fn can_cast(kind: SyntaxKind) -> bool {
9190        matches!(
9191            kind,
9192            ARRAY_EXPR
9193                | ASM_CLOBBER_ABI
9194                | ASM_EXPR
9195                | ASM_OPERAND_NAMED
9196                | ASM_OPTIONS
9197                | ASSOC_ITEM_LIST
9198                | AWAIT_EXPR
9199                | BECOME_EXPR
9200                | BIN_EXPR
9201                | BLOCK_EXPR
9202                | BREAK_EXPR
9203                | CALL_EXPR
9204                | CAST_EXPR
9205                | CLOSURE_EXPR
9206                | CONST
9207                | CONST_PARAM
9208                | CONTINUE_EXPR
9209                | ENUM
9210                | EXTERN_BLOCK
9211                | EXTERN_CRATE
9212                | EXTERN_ITEM_LIST
9213                | FIELD_EXPR
9214                | FN
9215                | FOR_EXPR
9216                | FORMAT_ARGS_EXPR
9217                | IDENT_PAT
9218                | IF_EXPR
9219                | IMPL
9220                | INDEX_EXPR
9221                | ITEM_LIST
9222                | LET_EXPR
9223                | LET_STMT
9224                | LIFETIME_PARAM
9225                | LITERAL
9226                | LOOP_EXPR
9227                | MACRO_CALL
9228                | MACRO_DEF
9229                | MACRO_RULES
9230                | MATCH_ARM
9231                | MATCH_ARM_LIST
9232                | MATCH_EXPR
9233                | METHOD_CALL_EXPR
9234                | MODULE
9235                | OFFSET_OF_EXPR
9236                | PARAM
9237                | PAREN_EXPR
9238                | PATH_EXPR
9239                | PREFIX_EXPR
9240                | RANGE_EXPR
9241                | RECORD_EXPR_FIELD
9242                | RECORD_EXPR_FIELD_LIST
9243                | RECORD_FIELD
9244                | RECORD_PAT_FIELD
9245                | REF_EXPR
9246                | REST_PAT
9247                | RETURN_EXPR
9248                | SELF_PARAM
9249                | SOURCE_FILE
9250                | STATIC
9251                | STMT_LIST
9252                | STRUCT
9253                | TRAIT
9254                | TRY_EXPR
9255                | TUPLE_EXPR
9256                | TUPLE_FIELD
9257                | TYPE_ALIAS
9258                | TYPE_PARAM
9259                | UNDERSCORE_EXPR
9260                | UNION
9261                | USE
9262                | VARIANT
9263                | WHILE_EXPR
9264                | YEET_EXPR
9265                | YIELD_EXPR
9266        )
9267    }
9268    #[inline]
9269    fn cast(syntax: SyntaxNode) -> Option<Self> {
9270        Self::can_cast(syntax.kind()).then_some(AnyHasAttrs { syntax })
9271    }
9272    #[inline]
9273    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9274}
9275impl hash::Hash for AnyHasAttrs {
9276    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9277}
9278impl Eq for AnyHasAttrs {}
9279impl PartialEq for AnyHasAttrs {
9280    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9281}
9282impl Clone for AnyHasAttrs {
9283    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9284}
9285impl fmt::Debug for AnyHasAttrs {
9286    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9287        f.debug_struct("AnyHasAttrs").field("syntax", &self.syntax).finish()
9288    }
9289}
9290impl From<ArrayExpr> for AnyHasAttrs {
9291    #[inline]
9292    fn from(node: ArrayExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9293}
9294impl From<AsmClobberAbi> for AnyHasAttrs {
9295    #[inline]
9296    fn from(node: AsmClobberAbi) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9297}
9298impl From<AsmExpr> for AnyHasAttrs {
9299    #[inline]
9300    fn from(node: AsmExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9301}
9302impl From<AsmOperandNamed> for AnyHasAttrs {
9303    #[inline]
9304    fn from(node: AsmOperandNamed) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9305}
9306impl From<AsmOptions> for AnyHasAttrs {
9307    #[inline]
9308    fn from(node: AsmOptions) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9309}
9310impl From<AssocItemList> for AnyHasAttrs {
9311    #[inline]
9312    fn from(node: AssocItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9313}
9314impl From<AwaitExpr> for AnyHasAttrs {
9315    #[inline]
9316    fn from(node: AwaitExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9317}
9318impl From<BecomeExpr> for AnyHasAttrs {
9319    #[inline]
9320    fn from(node: BecomeExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9321}
9322impl From<BinExpr> for AnyHasAttrs {
9323    #[inline]
9324    fn from(node: BinExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9325}
9326impl From<BlockExpr> for AnyHasAttrs {
9327    #[inline]
9328    fn from(node: BlockExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9329}
9330impl From<BreakExpr> for AnyHasAttrs {
9331    #[inline]
9332    fn from(node: BreakExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9333}
9334impl From<CallExpr> for AnyHasAttrs {
9335    #[inline]
9336    fn from(node: CallExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9337}
9338impl From<CastExpr> for AnyHasAttrs {
9339    #[inline]
9340    fn from(node: CastExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9341}
9342impl From<ClosureExpr> for AnyHasAttrs {
9343    #[inline]
9344    fn from(node: ClosureExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9345}
9346impl From<Const> for AnyHasAttrs {
9347    #[inline]
9348    fn from(node: Const) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9349}
9350impl From<ConstParam> for AnyHasAttrs {
9351    #[inline]
9352    fn from(node: ConstParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9353}
9354impl From<ContinueExpr> for AnyHasAttrs {
9355    #[inline]
9356    fn from(node: ContinueExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9357}
9358impl From<Enum> for AnyHasAttrs {
9359    #[inline]
9360    fn from(node: Enum) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9361}
9362impl From<ExternBlock> for AnyHasAttrs {
9363    #[inline]
9364    fn from(node: ExternBlock) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9365}
9366impl From<ExternCrate> for AnyHasAttrs {
9367    #[inline]
9368    fn from(node: ExternCrate) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9369}
9370impl From<ExternItemList> for AnyHasAttrs {
9371    #[inline]
9372    fn from(node: ExternItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9373}
9374impl From<FieldExpr> for AnyHasAttrs {
9375    #[inline]
9376    fn from(node: FieldExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9377}
9378impl From<Fn> for AnyHasAttrs {
9379    #[inline]
9380    fn from(node: Fn) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9381}
9382impl From<ForExpr> for AnyHasAttrs {
9383    #[inline]
9384    fn from(node: ForExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9385}
9386impl From<FormatArgsExpr> for AnyHasAttrs {
9387    #[inline]
9388    fn from(node: FormatArgsExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9389}
9390impl From<IdentPat> for AnyHasAttrs {
9391    #[inline]
9392    fn from(node: IdentPat) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9393}
9394impl From<IfExpr> for AnyHasAttrs {
9395    #[inline]
9396    fn from(node: IfExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9397}
9398impl From<Impl> for AnyHasAttrs {
9399    #[inline]
9400    fn from(node: Impl) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9401}
9402impl From<IndexExpr> for AnyHasAttrs {
9403    #[inline]
9404    fn from(node: IndexExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9405}
9406impl From<ItemList> for AnyHasAttrs {
9407    #[inline]
9408    fn from(node: ItemList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9409}
9410impl From<LetExpr> for AnyHasAttrs {
9411    #[inline]
9412    fn from(node: LetExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9413}
9414impl From<LetStmt> for AnyHasAttrs {
9415    #[inline]
9416    fn from(node: LetStmt) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9417}
9418impl From<LifetimeParam> for AnyHasAttrs {
9419    #[inline]
9420    fn from(node: LifetimeParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9421}
9422impl From<Literal> for AnyHasAttrs {
9423    #[inline]
9424    fn from(node: Literal) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9425}
9426impl From<LoopExpr> for AnyHasAttrs {
9427    #[inline]
9428    fn from(node: LoopExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9429}
9430impl From<MacroCall> for AnyHasAttrs {
9431    #[inline]
9432    fn from(node: MacroCall) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9433}
9434impl From<MacroDef> for AnyHasAttrs {
9435    #[inline]
9436    fn from(node: MacroDef) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9437}
9438impl From<MacroRules> for AnyHasAttrs {
9439    #[inline]
9440    fn from(node: MacroRules) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9441}
9442impl From<MatchArm> for AnyHasAttrs {
9443    #[inline]
9444    fn from(node: MatchArm) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9445}
9446impl From<MatchArmList> for AnyHasAttrs {
9447    #[inline]
9448    fn from(node: MatchArmList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9449}
9450impl From<MatchExpr> for AnyHasAttrs {
9451    #[inline]
9452    fn from(node: MatchExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9453}
9454impl From<MethodCallExpr> for AnyHasAttrs {
9455    #[inline]
9456    fn from(node: MethodCallExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9457}
9458impl From<Module> for AnyHasAttrs {
9459    #[inline]
9460    fn from(node: Module) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9461}
9462impl From<OffsetOfExpr> for AnyHasAttrs {
9463    #[inline]
9464    fn from(node: OffsetOfExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9465}
9466impl From<Param> for AnyHasAttrs {
9467    #[inline]
9468    fn from(node: Param) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9469}
9470impl From<ParenExpr> for AnyHasAttrs {
9471    #[inline]
9472    fn from(node: ParenExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9473}
9474impl From<PathExpr> for AnyHasAttrs {
9475    #[inline]
9476    fn from(node: PathExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9477}
9478impl From<PrefixExpr> for AnyHasAttrs {
9479    #[inline]
9480    fn from(node: PrefixExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9481}
9482impl From<RangeExpr> for AnyHasAttrs {
9483    #[inline]
9484    fn from(node: RangeExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9485}
9486impl From<RecordExprField> for AnyHasAttrs {
9487    #[inline]
9488    fn from(node: RecordExprField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9489}
9490impl From<RecordExprFieldList> for AnyHasAttrs {
9491    #[inline]
9492    fn from(node: RecordExprFieldList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9493}
9494impl From<RecordField> for AnyHasAttrs {
9495    #[inline]
9496    fn from(node: RecordField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9497}
9498impl From<RecordPatField> for AnyHasAttrs {
9499    #[inline]
9500    fn from(node: RecordPatField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9501}
9502impl From<RefExpr> for AnyHasAttrs {
9503    #[inline]
9504    fn from(node: RefExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9505}
9506impl From<RestPat> for AnyHasAttrs {
9507    #[inline]
9508    fn from(node: RestPat) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9509}
9510impl From<ReturnExpr> for AnyHasAttrs {
9511    #[inline]
9512    fn from(node: ReturnExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9513}
9514impl From<SelfParam> for AnyHasAttrs {
9515    #[inline]
9516    fn from(node: SelfParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9517}
9518impl From<SourceFile> for AnyHasAttrs {
9519    #[inline]
9520    fn from(node: SourceFile) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9521}
9522impl From<Static> for AnyHasAttrs {
9523    #[inline]
9524    fn from(node: Static) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9525}
9526impl From<StmtList> for AnyHasAttrs {
9527    #[inline]
9528    fn from(node: StmtList) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9529}
9530impl From<Struct> for AnyHasAttrs {
9531    #[inline]
9532    fn from(node: Struct) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9533}
9534impl From<Trait> for AnyHasAttrs {
9535    #[inline]
9536    fn from(node: Trait) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9537}
9538impl From<TryExpr> for AnyHasAttrs {
9539    #[inline]
9540    fn from(node: TryExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9541}
9542impl From<TupleExpr> for AnyHasAttrs {
9543    #[inline]
9544    fn from(node: TupleExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9545}
9546impl From<TupleField> for AnyHasAttrs {
9547    #[inline]
9548    fn from(node: TupleField) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9549}
9550impl From<TypeAlias> for AnyHasAttrs {
9551    #[inline]
9552    fn from(node: TypeAlias) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9553}
9554impl From<TypeParam> for AnyHasAttrs {
9555    #[inline]
9556    fn from(node: TypeParam) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9557}
9558impl From<UnderscoreExpr> for AnyHasAttrs {
9559    #[inline]
9560    fn from(node: UnderscoreExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9561}
9562impl From<Union> for AnyHasAttrs {
9563    #[inline]
9564    fn from(node: Union) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9565}
9566impl From<Use> for AnyHasAttrs {
9567    #[inline]
9568    fn from(node: Use) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9569}
9570impl From<Variant> for AnyHasAttrs {
9571    #[inline]
9572    fn from(node: Variant) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9573}
9574impl From<WhileExpr> for AnyHasAttrs {
9575    #[inline]
9576    fn from(node: WhileExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9577}
9578impl From<YeetExpr> for AnyHasAttrs {
9579    #[inline]
9580    fn from(node: YeetExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9581}
9582impl From<YieldExpr> for AnyHasAttrs {
9583    #[inline]
9584    fn from(node: YieldExpr) -> AnyHasAttrs { AnyHasAttrs { syntax: node.syntax } }
9585}
9586impl ast::HasGenericArgs for AnyHasGenericArgs {}
9587impl AstNode for AnyHasGenericArgs {
9588    #[inline]
9589    fn can_cast(kind: SyntaxKind) -> bool {
9590        matches!(kind, ASSOC_TYPE_ARG | METHOD_CALL_EXPR | PATH_SEGMENT)
9591    }
9592    #[inline]
9593    fn cast(syntax: SyntaxNode) -> Option<Self> {
9594        Self::can_cast(syntax.kind()).then_some(AnyHasGenericArgs { syntax })
9595    }
9596    #[inline]
9597    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9598}
9599impl hash::Hash for AnyHasGenericArgs {
9600    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9601}
9602impl Eq for AnyHasGenericArgs {}
9603impl PartialEq for AnyHasGenericArgs {
9604    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9605}
9606impl Clone for AnyHasGenericArgs {
9607    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9608}
9609impl fmt::Debug for AnyHasGenericArgs {
9610    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9611        f.debug_struct("AnyHasGenericArgs").field("syntax", &self.syntax).finish()
9612    }
9613}
9614impl From<AssocTypeArg> for AnyHasGenericArgs {
9615    #[inline]
9616    fn from(node: AssocTypeArg) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
9617}
9618impl From<MethodCallExpr> for AnyHasGenericArgs {
9619    #[inline]
9620    fn from(node: MethodCallExpr) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
9621}
9622impl From<PathSegment> for AnyHasGenericArgs {
9623    #[inline]
9624    fn from(node: PathSegment) -> AnyHasGenericArgs { AnyHasGenericArgs { syntax: node.syntax } }
9625}
9626impl ast::HasGenericParams for AnyHasGenericParams {}
9627impl AstNode for AnyHasGenericParams {
9628    #[inline]
9629    fn can_cast(kind: SyntaxKind) -> bool {
9630        matches!(kind, CONST | ENUM | FN | IMPL | STRUCT | TRAIT | TYPE_ALIAS | UNION)
9631    }
9632    #[inline]
9633    fn cast(syntax: SyntaxNode) -> Option<Self> {
9634        Self::can_cast(syntax.kind()).then_some(AnyHasGenericParams { syntax })
9635    }
9636    #[inline]
9637    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9638}
9639impl hash::Hash for AnyHasGenericParams {
9640    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9641}
9642impl Eq for AnyHasGenericParams {}
9643impl PartialEq for AnyHasGenericParams {
9644    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9645}
9646impl Clone for AnyHasGenericParams {
9647    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9648}
9649impl fmt::Debug for AnyHasGenericParams {
9650    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9651        f.debug_struct("AnyHasGenericParams").field("syntax", &self.syntax).finish()
9652    }
9653}
9654impl From<Const> for AnyHasGenericParams {
9655    #[inline]
9656    fn from(node: Const) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9657}
9658impl From<Enum> for AnyHasGenericParams {
9659    #[inline]
9660    fn from(node: Enum) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9661}
9662impl From<Fn> for AnyHasGenericParams {
9663    #[inline]
9664    fn from(node: Fn) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9665}
9666impl From<Impl> for AnyHasGenericParams {
9667    #[inline]
9668    fn from(node: Impl) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9669}
9670impl From<Struct> for AnyHasGenericParams {
9671    #[inline]
9672    fn from(node: Struct) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9673}
9674impl From<Trait> for AnyHasGenericParams {
9675    #[inline]
9676    fn from(node: Trait) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9677}
9678impl From<TypeAlias> for AnyHasGenericParams {
9679    #[inline]
9680    fn from(node: TypeAlias) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9681}
9682impl From<Union> for AnyHasGenericParams {
9683    #[inline]
9684    fn from(node: Union) -> AnyHasGenericParams { AnyHasGenericParams { syntax: node.syntax } }
9685}
9686impl ast::HasLoopBody for AnyHasLoopBody {}
9687impl AstNode for AnyHasLoopBody {
9688    #[inline]
9689    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, FOR_EXPR | LOOP_EXPR | WHILE_EXPR) }
9690    #[inline]
9691    fn cast(syntax: SyntaxNode) -> Option<Self> {
9692        Self::can_cast(syntax.kind()).then_some(AnyHasLoopBody { syntax })
9693    }
9694    #[inline]
9695    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9696}
9697impl hash::Hash for AnyHasLoopBody {
9698    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9699}
9700impl Eq for AnyHasLoopBody {}
9701impl PartialEq for AnyHasLoopBody {
9702    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9703}
9704impl Clone for AnyHasLoopBody {
9705    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9706}
9707impl fmt::Debug for AnyHasLoopBody {
9708    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9709        f.debug_struct("AnyHasLoopBody").field("syntax", &self.syntax).finish()
9710    }
9711}
9712impl From<ForExpr> for AnyHasLoopBody {
9713    #[inline]
9714    fn from(node: ForExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
9715}
9716impl From<LoopExpr> for AnyHasLoopBody {
9717    #[inline]
9718    fn from(node: LoopExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
9719}
9720impl From<WhileExpr> for AnyHasLoopBody {
9721    #[inline]
9722    fn from(node: WhileExpr) -> AnyHasLoopBody { AnyHasLoopBody { syntax: node.syntax } }
9723}
9724impl ast::HasModuleItem for AnyHasModuleItem {}
9725impl AstNode for AnyHasModuleItem {
9726    #[inline]
9727    fn can_cast(kind: SyntaxKind) -> bool { matches!(kind, ITEM_LIST | MACRO_ITEMS | SOURCE_FILE) }
9728    #[inline]
9729    fn cast(syntax: SyntaxNode) -> Option<Self> {
9730        Self::can_cast(syntax.kind()).then_some(AnyHasModuleItem { syntax })
9731    }
9732    #[inline]
9733    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9734}
9735impl hash::Hash for AnyHasModuleItem {
9736    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9737}
9738impl Eq for AnyHasModuleItem {}
9739impl PartialEq for AnyHasModuleItem {
9740    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9741}
9742impl Clone for AnyHasModuleItem {
9743    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9744}
9745impl fmt::Debug for AnyHasModuleItem {
9746    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9747        f.debug_struct("AnyHasModuleItem").field("syntax", &self.syntax).finish()
9748    }
9749}
9750impl From<ItemList> for AnyHasModuleItem {
9751    #[inline]
9752    fn from(node: ItemList) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9753}
9754impl From<MacroItems> for AnyHasModuleItem {
9755    #[inline]
9756    fn from(node: MacroItems) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9757}
9758impl From<SourceFile> for AnyHasModuleItem {
9759    #[inline]
9760    fn from(node: SourceFile) -> AnyHasModuleItem { AnyHasModuleItem { syntax: node.syntax } }
9761}
9762impl ast::HasName for AnyHasName {}
9763impl AstNode for AnyHasName {
9764    #[inline]
9765    fn can_cast(kind: SyntaxKind) -> bool {
9766        matches!(
9767            kind,
9768            ASM_OPERAND_NAMED
9769                | CONST
9770                | CONST_PARAM
9771                | ENUM
9772                | FN
9773                | FORMAT_ARGS_ARG
9774                | IDENT_PAT
9775                | MACRO_DEF
9776                | MACRO_RULES
9777                | MODULE
9778                | RECORD_FIELD
9779                | RENAME
9780                | SELF_PARAM
9781                | STATIC
9782                | STRUCT
9783                | TRAIT
9784                | TYPE_ALIAS
9785                | TYPE_PARAM
9786                | UNION
9787                | VARIANT
9788        )
9789    }
9790    #[inline]
9791    fn cast(syntax: SyntaxNode) -> Option<Self> {
9792        Self::can_cast(syntax.kind()).then_some(AnyHasName { syntax })
9793    }
9794    #[inline]
9795    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9796}
9797impl hash::Hash for AnyHasName {
9798    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9799}
9800impl Eq for AnyHasName {}
9801impl PartialEq for AnyHasName {
9802    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9803}
9804impl Clone for AnyHasName {
9805    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9806}
9807impl fmt::Debug for AnyHasName {
9808    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9809        f.debug_struct("AnyHasName").field("syntax", &self.syntax).finish()
9810    }
9811}
9812impl From<AsmOperandNamed> for AnyHasName {
9813    #[inline]
9814    fn from(node: AsmOperandNamed) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9815}
9816impl From<Const> for AnyHasName {
9817    #[inline]
9818    fn from(node: Const) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9819}
9820impl From<ConstParam> for AnyHasName {
9821    #[inline]
9822    fn from(node: ConstParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9823}
9824impl From<Enum> for AnyHasName {
9825    #[inline]
9826    fn from(node: Enum) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9827}
9828impl From<Fn> for AnyHasName {
9829    #[inline]
9830    fn from(node: Fn) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9831}
9832impl From<FormatArgsArg> for AnyHasName {
9833    #[inline]
9834    fn from(node: FormatArgsArg) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9835}
9836impl From<IdentPat> for AnyHasName {
9837    #[inline]
9838    fn from(node: IdentPat) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9839}
9840impl From<MacroDef> for AnyHasName {
9841    #[inline]
9842    fn from(node: MacroDef) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9843}
9844impl From<MacroRules> for AnyHasName {
9845    #[inline]
9846    fn from(node: MacroRules) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9847}
9848impl From<Module> for AnyHasName {
9849    #[inline]
9850    fn from(node: Module) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9851}
9852impl From<RecordField> for AnyHasName {
9853    #[inline]
9854    fn from(node: RecordField) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9855}
9856impl From<Rename> for AnyHasName {
9857    #[inline]
9858    fn from(node: Rename) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9859}
9860impl From<SelfParam> for AnyHasName {
9861    #[inline]
9862    fn from(node: SelfParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9863}
9864impl From<Static> for AnyHasName {
9865    #[inline]
9866    fn from(node: Static) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9867}
9868impl From<Struct> for AnyHasName {
9869    #[inline]
9870    fn from(node: Struct) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9871}
9872impl From<Trait> for AnyHasName {
9873    #[inline]
9874    fn from(node: Trait) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9875}
9876impl From<TypeAlias> for AnyHasName {
9877    #[inline]
9878    fn from(node: TypeAlias) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9879}
9880impl From<TypeParam> for AnyHasName {
9881    #[inline]
9882    fn from(node: TypeParam) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9883}
9884impl From<Union> for AnyHasName {
9885    #[inline]
9886    fn from(node: Union) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9887}
9888impl From<Variant> for AnyHasName {
9889    #[inline]
9890    fn from(node: Variant) -> AnyHasName { AnyHasName { syntax: node.syntax } }
9891}
9892impl ast::HasTypeBounds for AnyHasTypeBounds {}
9893impl AstNode for AnyHasTypeBounds {
9894    #[inline]
9895    fn can_cast(kind: SyntaxKind) -> bool {
9896        matches!(
9897            kind,
9898            ASSOC_TYPE_ARG | LIFETIME_PARAM | TRAIT | TYPE_ALIAS | TYPE_PARAM | WHERE_PRED
9899        )
9900    }
9901    #[inline]
9902    fn cast(syntax: SyntaxNode) -> Option<Self> {
9903        Self::can_cast(syntax.kind()).then_some(AnyHasTypeBounds { syntax })
9904    }
9905    #[inline]
9906    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9907}
9908impl hash::Hash for AnyHasTypeBounds {
9909    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9910}
9911impl Eq for AnyHasTypeBounds {}
9912impl PartialEq for AnyHasTypeBounds {
9913    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9914}
9915impl Clone for AnyHasTypeBounds {
9916    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9917}
9918impl fmt::Debug for AnyHasTypeBounds {
9919    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9920        f.debug_struct("AnyHasTypeBounds").field("syntax", &self.syntax).finish()
9921    }
9922}
9923impl From<AssocTypeArg> for AnyHasTypeBounds {
9924    #[inline]
9925    fn from(node: AssocTypeArg) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9926}
9927impl From<LifetimeParam> for AnyHasTypeBounds {
9928    #[inline]
9929    fn from(node: LifetimeParam) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9930}
9931impl From<Trait> for AnyHasTypeBounds {
9932    #[inline]
9933    fn from(node: Trait) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9934}
9935impl From<TypeAlias> for AnyHasTypeBounds {
9936    #[inline]
9937    fn from(node: TypeAlias) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9938}
9939impl From<TypeParam> for AnyHasTypeBounds {
9940    #[inline]
9941    fn from(node: TypeParam) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9942}
9943impl From<WherePred> for AnyHasTypeBounds {
9944    #[inline]
9945    fn from(node: WherePred) -> AnyHasTypeBounds { AnyHasTypeBounds { syntax: node.syntax } }
9946}
9947impl ast::HasVisibility for AnyHasVisibility {}
9948impl AstNode for AnyHasVisibility {
9949    #[inline]
9950    fn can_cast(kind: SyntaxKind) -> bool {
9951        matches!(
9952            kind,
9953            CONST
9954                | ENUM
9955                | EXTERN_CRATE
9956                | FN
9957                | IMPL
9958                | MACRO_DEF
9959                | MACRO_RULES
9960                | MODULE
9961                | RECORD_FIELD
9962                | STATIC
9963                | STRUCT
9964                | TRAIT
9965                | TUPLE_FIELD
9966                | TYPE_ALIAS
9967                | UNION
9968                | USE
9969                | VARIANT
9970        )
9971    }
9972    #[inline]
9973    fn cast(syntax: SyntaxNode) -> Option<Self> {
9974        Self::can_cast(syntax.kind()).then_some(AnyHasVisibility { syntax })
9975    }
9976    #[inline]
9977    fn syntax(&self) -> &SyntaxNode { &self.syntax }
9978}
9979impl hash::Hash for AnyHasVisibility {
9980    fn hash<H: hash::Hasher>(&self, state: &mut H) { self.syntax.hash(state); }
9981}
9982impl Eq for AnyHasVisibility {}
9983impl PartialEq for AnyHasVisibility {
9984    fn eq(&self, other: &Self) -> bool { self.syntax == other.syntax }
9985}
9986impl Clone for AnyHasVisibility {
9987    fn clone(&self) -> Self { Self { syntax: self.syntax.clone() } }
9988}
9989impl fmt::Debug for AnyHasVisibility {
9990    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9991        f.debug_struct("AnyHasVisibility").field("syntax", &self.syntax).finish()
9992    }
9993}
9994impl From<Const> for AnyHasVisibility {
9995    #[inline]
9996    fn from(node: Const) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
9997}
9998impl From<Enum> for AnyHasVisibility {
9999    #[inline]
10000    fn from(node: Enum) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10001}
10002impl From<ExternCrate> for AnyHasVisibility {
10003    #[inline]
10004    fn from(node: ExternCrate) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10005}
10006impl From<Fn> for AnyHasVisibility {
10007    #[inline]
10008    fn from(node: Fn) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10009}
10010impl From<Impl> for AnyHasVisibility {
10011    #[inline]
10012    fn from(node: Impl) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10013}
10014impl From<MacroDef> for AnyHasVisibility {
10015    #[inline]
10016    fn from(node: MacroDef) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10017}
10018impl From<MacroRules> for AnyHasVisibility {
10019    #[inline]
10020    fn from(node: MacroRules) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10021}
10022impl From<Module> for AnyHasVisibility {
10023    #[inline]
10024    fn from(node: Module) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10025}
10026impl From<RecordField> for AnyHasVisibility {
10027    #[inline]
10028    fn from(node: RecordField) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10029}
10030impl From<Static> for AnyHasVisibility {
10031    #[inline]
10032    fn from(node: Static) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10033}
10034impl From<Struct> for AnyHasVisibility {
10035    #[inline]
10036    fn from(node: Struct) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10037}
10038impl From<Trait> for AnyHasVisibility {
10039    #[inline]
10040    fn from(node: Trait) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10041}
10042impl From<TupleField> for AnyHasVisibility {
10043    #[inline]
10044    fn from(node: TupleField) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10045}
10046impl From<TypeAlias> for AnyHasVisibility {
10047    #[inline]
10048    fn from(node: TypeAlias) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10049}
10050impl From<Union> for AnyHasVisibility {
10051    #[inline]
10052    fn from(node: Union) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10053}
10054impl From<Use> for AnyHasVisibility {
10055    #[inline]
10056    fn from(node: Use) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10057}
10058impl From<Variant> for AnyHasVisibility {
10059    #[inline]
10060    fn from(node: Variant) -> AnyHasVisibility { AnyHasVisibility { syntax: node.syntax } }
10061}
10062impl std::fmt::Display for Adt {
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 AnyAttr {
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 AsmOperand {
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 AsmPiece {
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 AssocItem {
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 CfgPredicate {
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 Expr {
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 ExternItem {
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 FieldList {
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 GenericArg {
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 GenericParam {
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 Item {
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 Meta {
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 Pat {
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 Stmt {
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 Type {
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 UseBoundGenericArg {
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 VariantDef {
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 Abi {
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 ArgList {
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 ArrayExpr {
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 ArrayType {
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 AsmClobberAbi {
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 AsmConst {
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 AsmDirSpec {
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 AsmExpr {
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 AsmLabel {
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 AsmOperandExpr {
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 AsmOperandNamed {
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 AsmOption {
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 AsmOptions {
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 AsmRegOperand {
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 AsmRegSpec {
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 AsmSym {
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 AssocItemList {
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 AssocTypeArg {
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 Attr {
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 AwaitExpr {
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 BecomeExpr {
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 BinExpr {
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 BlockExpr {
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 BoxPat {
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 BreakExpr {
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 CallExpr {
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 CastExpr {
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 CfgAtom {
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 CfgAttrMeta {
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 CfgComposite {
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 CfgMeta {
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 CfgPredExpr {
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 CfgPredPat {
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 ClosureExpr {
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 Const {
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 ConstArg {
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 ConstBlockPat {
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 ConstParam {
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 ContinueExpr {
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 DerefPat {
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 DocComment {
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 DynTraitType {
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 Enum {
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 ExprStmt {
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 ExternBlock {
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 ExternCrate {
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 ExternItemList {
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 FieldExpr {
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 Fn {
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 FnPtrType {
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 ForBinder {
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 ForExpr {
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 ForType {
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 FormatArgsArg {
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 FormatArgsExpr {
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 GenericArgList {
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 GenericParamList {
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 IdentPat {
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 IfExpr {
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 Impl {
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 ImplRestriction {
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 ImplTraitType {
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 IncludeBytesExpr {
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 IndexExpr {
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 InferType {
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 ItemList {
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 KeyValueMeta {
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 Label {
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 LetElse {
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 LetExpr {
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 LetStmt {
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 Lifetime {
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 LifetimeArg {
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 LifetimeParam {
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 Literal {
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 LiteralPat {
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 LoopExpr {
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 MacroCall {
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 MacroDef {
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 MacroExpr {
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 MacroItems {
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 MacroPat {
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 MacroRules {
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 MacroStmts {
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 MacroType {
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 MatchArm {
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 MatchArmList {
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 MatchExpr {
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 MatchGuard {
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 MethodCallExpr {
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 Module {
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 MutRestriction {
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 Name {
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 NameRef {
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 NeverType {
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 NotNull {
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 OffsetOfExpr {
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 OrPat {
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 Param {
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 ParamList {
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 ParenExpr {
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 ParenPat {
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 ParenType {
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 ParenthesizedArgList {
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 Path {
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 PathExpr {
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 PathMeta {
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 PathPat {
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 PathSegment {
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 PathType {
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 PatternType {
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 PrefixExpr {
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 PtrType {
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 RangeExpr {
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 RangePat {
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 RecordExpr {
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 RecordExprField {
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 RecordExprFieldList {
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 RecordField {
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 RecordFieldList {
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 RecordPat {
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 RecordPatField {
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 RecordPatFieldList {
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 RefExpr {
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 RefPat {
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 RefType {
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 Rename {
10783    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10784        std::fmt::Display::fmt(self.syntax(), f)
10785    }
10786}
10787impl std::fmt::Display for RestPat {
10788    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10789        std::fmt::Display::fmt(self.syntax(), f)
10790    }
10791}
10792impl std::fmt::Display for RetType {
10793    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10794        std::fmt::Display::fmt(self.syntax(), f)
10795    }
10796}
10797impl std::fmt::Display for ReturnExpr {
10798    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10799        std::fmt::Display::fmt(self.syntax(), f)
10800    }
10801}
10802impl std::fmt::Display for ReturnTypeSyntax {
10803    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10804        std::fmt::Display::fmt(self.syntax(), f)
10805    }
10806}
10807impl std::fmt::Display for SelfParam {
10808    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10809        std::fmt::Display::fmt(self.syntax(), f)
10810    }
10811}
10812impl std::fmt::Display for SlicePat {
10813    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10814        std::fmt::Display::fmt(self.syntax(), f)
10815    }
10816}
10817impl std::fmt::Display for SliceType {
10818    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10819        std::fmt::Display::fmt(self.syntax(), f)
10820    }
10821}
10822impl std::fmt::Display for SourceFile {
10823    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10824        std::fmt::Display::fmt(self.syntax(), f)
10825    }
10826}
10827impl std::fmt::Display for Static {
10828    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10829        std::fmt::Display::fmt(self.syntax(), f)
10830    }
10831}
10832impl std::fmt::Display for StmtList {
10833    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10834        std::fmt::Display::fmt(self.syntax(), f)
10835    }
10836}
10837impl std::fmt::Display for Struct {
10838    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10839        std::fmt::Display::fmt(self.syntax(), f)
10840    }
10841}
10842impl std::fmt::Display for TokenTree {
10843    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10844        std::fmt::Display::fmt(self.syntax(), f)
10845    }
10846}
10847impl std::fmt::Display for TokenTreeMeta {
10848    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10849        std::fmt::Display::fmt(self.syntax(), f)
10850    }
10851}
10852impl std::fmt::Display for Trait {
10853    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10854        std::fmt::Display::fmt(self.syntax(), f)
10855    }
10856}
10857impl std::fmt::Display for TryBlockModifier {
10858    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10859        std::fmt::Display::fmt(self.syntax(), f)
10860    }
10861}
10862impl std::fmt::Display for TryExpr {
10863    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10864        std::fmt::Display::fmt(self.syntax(), f)
10865    }
10866}
10867impl std::fmt::Display for TupleExpr {
10868    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10869        std::fmt::Display::fmt(self.syntax(), f)
10870    }
10871}
10872impl std::fmt::Display for TupleField {
10873    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10874        std::fmt::Display::fmt(self.syntax(), f)
10875    }
10876}
10877impl std::fmt::Display for TupleFieldList {
10878    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10879        std::fmt::Display::fmt(self.syntax(), f)
10880    }
10881}
10882impl std::fmt::Display for TuplePat {
10883    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10884        std::fmt::Display::fmt(self.syntax(), f)
10885    }
10886}
10887impl std::fmt::Display for TupleStructPat {
10888    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10889        std::fmt::Display::fmt(self.syntax(), f)
10890    }
10891}
10892impl std::fmt::Display for TupleType {
10893    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10894        std::fmt::Display::fmt(self.syntax(), f)
10895    }
10896}
10897impl std::fmt::Display for TypeAlias {
10898    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10899        std::fmt::Display::fmt(self.syntax(), f)
10900    }
10901}
10902impl std::fmt::Display for TypeAnchor {
10903    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10904        std::fmt::Display::fmt(self.syntax(), f)
10905    }
10906}
10907impl std::fmt::Display for TypeArg {
10908    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10909        std::fmt::Display::fmt(self.syntax(), f)
10910    }
10911}
10912impl std::fmt::Display for TypeBound {
10913    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10914        std::fmt::Display::fmt(self.syntax(), f)
10915    }
10916}
10917impl std::fmt::Display for TypeBoundList {
10918    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10919        std::fmt::Display::fmt(self.syntax(), f)
10920    }
10921}
10922impl std::fmt::Display for TypeParam {
10923    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10924        std::fmt::Display::fmt(self.syntax(), f)
10925    }
10926}
10927impl std::fmt::Display for UnderscoreExpr {
10928    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10929        std::fmt::Display::fmt(self.syntax(), f)
10930    }
10931}
10932impl std::fmt::Display for Union {
10933    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10934        std::fmt::Display::fmt(self.syntax(), f)
10935    }
10936}
10937impl std::fmt::Display for UnsafeMeta {
10938    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10939        std::fmt::Display::fmt(self.syntax(), f)
10940    }
10941}
10942impl std::fmt::Display for Use {
10943    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10944        std::fmt::Display::fmt(self.syntax(), f)
10945    }
10946}
10947impl std::fmt::Display for UseBoundGenericArgs {
10948    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10949        std::fmt::Display::fmt(self.syntax(), f)
10950    }
10951}
10952impl std::fmt::Display for UseTree {
10953    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10954        std::fmt::Display::fmt(self.syntax(), f)
10955    }
10956}
10957impl std::fmt::Display for UseTreeList {
10958    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10959        std::fmt::Display::fmt(self.syntax(), f)
10960    }
10961}
10962impl std::fmt::Display for Variant {
10963    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10964        std::fmt::Display::fmt(self.syntax(), f)
10965    }
10966}
10967impl std::fmt::Display for VariantList {
10968    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10969        std::fmt::Display::fmt(self.syntax(), f)
10970    }
10971}
10972impl std::fmt::Display for Visibility {
10973    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10974        std::fmt::Display::fmt(self.syntax(), f)
10975    }
10976}
10977impl std::fmt::Display for VisibilityInner {
10978    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10979        std::fmt::Display::fmt(self.syntax(), f)
10980    }
10981}
10982impl std::fmt::Display for WhereClause {
10983    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10984        std::fmt::Display::fmt(self.syntax(), f)
10985    }
10986}
10987impl std::fmt::Display for WherePred {
10988    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10989        std::fmt::Display::fmt(self.syntax(), f)
10990    }
10991}
10992impl std::fmt::Display for WhileExpr {
10993    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10994        std::fmt::Display::fmt(self.syntax(), f)
10995    }
10996}
10997impl std::fmt::Display for WildcardPat {
10998    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10999        std::fmt::Display::fmt(self.syntax(), f)
11000    }
11001}
11002impl std::fmt::Display for YeetExpr {
11003    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11004        std::fmt::Display::fmt(self.syntax(), f)
11005    }
11006}
11007impl std::fmt::Display for YieldExpr {
11008    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11009        std::fmt::Display::fmt(self.syntax(), f)
11010    }
11011}