@@ -120,7 +120,7 @@ pub struct AssocTypeArg {
120
120
impl ast:: HasTypeBounds for AssocTypeArg { }
121
121
impl AssocTypeArg {
122
122
pub fn name_ref ( & self ) -> Option < NameRef > { support:: child ( & self . syntax ) }
123
- pub fn generic_param_list ( & self ) -> Option < GenericParamList > { support:: child ( & self . syntax ) }
123
+ pub fn generic_arg_list ( & self ) -> Option < GenericArgList > { support:: child ( & self . syntax ) }
124
124
pub fn eq_token ( & self ) -> Option < SyntaxToken > { support:: token ( & self . syntax , T ! [ =] ) }
125
125
pub fn ty ( & self ) -> Option < Type > { support:: child ( & self . syntax ) }
126
126
pub fn const_arg ( & self ) -> Option < ConstArg > { support:: child ( & self . syntax ) }
@@ -142,16 +142,6 @@ impl ConstArg {
142
142
pub fn expr ( & self ) -> Option < Expr > { support:: child ( & self . syntax ) }
143
143
}
144
144
145
- #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
146
- pub struct GenericParamList {
147
- pub ( crate ) syntax : SyntaxNode ,
148
- }
149
- impl GenericParamList {
150
- pub fn l_angle_token ( & self ) -> Option < SyntaxToken > { support:: token ( & self . syntax , T ! [ <] ) }
151
- pub fn generic_params ( & self ) -> AstChildren < GenericParam > { support:: children ( & self . syntax ) }
152
- pub fn r_angle_token ( & self ) -> Option < SyntaxToken > { support:: token ( & self . syntax , T ! [ >] ) }
153
- }
154
-
155
145
#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
156
146
pub struct TypeBoundList {
157
147
pub ( crate ) syntax : SyntaxNode ,
@@ -527,6 +517,16 @@ impl Abi {
527
517
pub fn extern_token ( & self ) -> Option < SyntaxToken > { support:: token ( & self . syntax , T ! [ extern] ) }
528
518
}
529
519
520
+ #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
521
+ pub struct GenericParamList {
522
+ pub ( crate ) syntax : SyntaxNode ,
523
+ }
524
+ impl GenericParamList {
525
+ pub fn l_angle_token ( & self ) -> Option < SyntaxToken > { support:: token ( & self . syntax , T ! [ <] ) }
526
+ pub fn generic_params ( & self ) -> AstChildren < GenericParam > { support:: children ( & self . syntax ) }
527
+ pub fn r_angle_token ( & self ) -> Option < SyntaxToken > { support:: token ( & self . syntax , T ! [ >] ) }
528
+ }
529
+
530
530
#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
531
531
pub struct WhereClause {
532
532
pub ( crate ) syntax : SyntaxNode ,
@@ -1834,17 +1834,6 @@ impl AstNode for ConstArg {
1834
1834
}
1835
1835
fn syntax ( & self ) -> & SyntaxNode { & self . syntax }
1836
1836
}
1837
- impl AstNode for GenericParamList {
1838
- fn can_cast ( kind : SyntaxKind ) -> bool { kind == GENERIC_PARAM_LIST }
1839
- fn cast ( syntax : SyntaxNode ) -> Option < Self > {
1840
- if Self :: can_cast ( syntax. kind ( ) ) {
1841
- Some ( Self { syntax } )
1842
- } else {
1843
- None
1844
- }
1845
- }
1846
- fn syntax ( & self ) -> & SyntaxNode { & self . syntax }
1847
- }
1848
1837
impl AstNode for TypeBoundList {
1849
1838
fn can_cast ( kind : SyntaxKind ) -> bool { kind == TYPE_BOUND_LIST }
1850
1839
fn cast ( syntax : SyntaxNode ) -> Option < Self > {
@@ -2153,6 +2142,17 @@ impl AstNode for Abi {
2153
2142
}
2154
2143
fn syntax ( & self ) -> & SyntaxNode { & self . syntax }
2155
2144
}
2145
+ impl AstNode for GenericParamList {
2146
+ fn can_cast ( kind : SyntaxKind ) -> bool { kind == GENERIC_PARAM_LIST }
2147
+ fn cast ( syntax : SyntaxNode ) -> Option < Self > {
2148
+ if Self :: can_cast ( syntax. kind ( ) ) {
2149
+ Some ( Self { syntax } )
2150
+ } else {
2151
+ None
2152
+ }
2153
+ }
2154
+ fn syntax ( & self ) -> & SyntaxNode { & self . syntax }
2155
+ }
2156
2156
impl AstNode for WhereClause {
2157
2157
fn can_cast ( kind : SyntaxKind ) -> bool { kind == WHERE_CLAUSE }
2158
2158
fn cast ( syntax : SyntaxNode ) -> Option < Self > {
@@ -4263,11 +4263,6 @@ impl std::fmt::Display for ConstArg {
4263
4263
std:: fmt:: Display :: fmt ( self . syntax ( ) , f)
4264
4264
}
4265
4265
}
4266
- impl std:: fmt:: Display for GenericParamList {
4267
- fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
4268
- std:: fmt:: Display :: fmt ( self . syntax ( ) , f)
4269
- }
4270
- }
4271
4266
impl std:: fmt:: Display for TypeBoundList {
4272
4267
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
4273
4268
std:: fmt:: Display :: fmt ( self . syntax ( ) , f)
@@ -4408,6 +4403,11 @@ impl std::fmt::Display for Abi {
4408
4403
std:: fmt:: Display :: fmt ( self . syntax ( ) , f)
4409
4404
}
4410
4405
}
4406
+ impl std:: fmt:: Display for GenericParamList {
4407
+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
4408
+ std:: fmt:: Display :: fmt ( self . syntax ( ) , f)
4409
+ }
4410
+ }
4411
4411
impl std:: fmt:: Display for WhereClause {
4412
4412
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
4413
4413
std:: fmt:: Display :: fmt ( self . syntax ( ) , f)
0 commit comments