aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated/nodes.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 14:39:55 +0100
committerGitHub <[email protected]>2020-07-30 14:39:55 +0100
commit97fb5daf723c520b0361ade3e44f130257b1fe96 (patch)
tree82f372ea7b9560cf8fbf861203460fe2aa2d4c88 /crates/ra_syntax/src/ast/generated/nodes.rs
parentee00679331b87dacc5fe608f153be160c1cb144c (diff)
parent28ef4c375a9f56d69daf885504aea3df7012bb81 (diff)
Merge #5592
5592: Rename TypeParamList -> GenericParamList r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/generated/nodes.rs')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index ad8ccf1ce..efe0cbe3a 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -50,7 +50,7 @@ pub struct EnumDef {
50impl ast::AttrsOwner for EnumDef {} 50impl ast::AttrsOwner for EnumDef {}
51impl ast::NameOwner for EnumDef {} 51impl ast::NameOwner for EnumDef {}
52impl ast::VisibilityOwner for EnumDef {} 52impl ast::VisibilityOwner for EnumDef {}
53impl ast::TypeParamsOwner for EnumDef {} 53impl ast::GenericParamsOwner for EnumDef {}
54impl EnumDef { 54impl EnumDef {
55 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) } 55 pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) }
56 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } 56 pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) }
@@ -85,7 +85,7 @@ pub struct Fn {
85impl ast::AttrsOwner for Fn {} 85impl ast::AttrsOwner for Fn {}
86impl ast::NameOwner for Fn {} 86impl ast::NameOwner for Fn {}
87impl ast::VisibilityOwner for Fn {} 87impl ast::VisibilityOwner for Fn {}
88impl ast::TypeParamsOwner for Fn {} 88impl ast::GenericParamsOwner for Fn {}
89impl Fn { 89impl Fn {
90 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } 90 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
91 pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) } 91 pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
@@ -104,7 +104,7 @@ pub struct ImplDef {
104} 104}
105impl ast::AttrsOwner for ImplDef {} 105impl ast::AttrsOwner for ImplDef {}
106impl ast::VisibilityOwner for ImplDef {} 106impl ast::VisibilityOwner for ImplDef {}
107impl ast::TypeParamsOwner for ImplDef {} 107impl ast::GenericParamsOwner for ImplDef {}
108impl ImplDef { 108impl ImplDef {
109 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } 109 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
110 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } 110 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
@@ -161,7 +161,7 @@ pub struct StructDef {
161impl ast::AttrsOwner for StructDef {} 161impl ast::AttrsOwner for StructDef {}
162impl ast::NameOwner for StructDef {} 162impl ast::NameOwner for StructDef {}
163impl ast::VisibilityOwner for StructDef {} 163impl ast::VisibilityOwner for StructDef {}
164impl ast::TypeParamsOwner for StructDef {} 164impl ast::GenericParamsOwner for StructDef {}
165impl StructDef { 165impl StructDef {
166 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) } 166 pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) }
167 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 167 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
@@ -174,7 +174,7 @@ pub struct TraitDef {
174impl ast::AttrsOwner for TraitDef {} 174impl ast::AttrsOwner for TraitDef {}
175impl ast::NameOwner for TraitDef {} 175impl ast::NameOwner for TraitDef {}
176impl ast::VisibilityOwner for TraitDef {} 176impl ast::VisibilityOwner for TraitDef {}
177impl ast::TypeParamsOwner for TraitDef {} 177impl ast::GenericParamsOwner for TraitDef {}
178impl ast::TypeBoundsOwner for TraitDef {} 178impl ast::TypeBoundsOwner for TraitDef {}
179impl TraitDef { 179impl TraitDef {
180 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } 180 pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
@@ -189,7 +189,7 @@ pub struct TypeAlias {
189impl ast::AttrsOwner for TypeAlias {} 189impl ast::AttrsOwner for TypeAlias {}
190impl ast::NameOwner for TypeAlias {} 190impl ast::NameOwner for TypeAlias {}
191impl ast::VisibilityOwner for TypeAlias {} 191impl ast::VisibilityOwner for TypeAlias {}
192impl ast::TypeParamsOwner for TypeAlias {} 192impl ast::GenericParamsOwner for TypeAlias {}
193impl ast::TypeBoundsOwner for TypeAlias {} 193impl ast::TypeBoundsOwner for TypeAlias {}
194impl TypeAlias { 194impl TypeAlias {
195 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } 195 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
@@ -205,7 +205,7 @@ pub struct UnionDef {
205impl ast::AttrsOwner for UnionDef {} 205impl ast::AttrsOwner for UnionDef {}
206impl ast::NameOwner for UnionDef {} 206impl ast::NameOwner for UnionDef {}
207impl ast::VisibilityOwner for UnionDef {} 207impl ast::VisibilityOwner for UnionDef {}
208impl ast::TypeParamsOwner for UnionDef {} 208impl ast::GenericParamsOwner for UnionDef {}
209impl UnionDef { 209impl UnionDef {
210 pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) } 210 pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) }
211 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { 211 pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> {
@@ -307,10 +307,10 @@ impl Abi {
307 pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) } 307 pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) }
308} 308}
309#[derive(Debug, Clone, PartialEq, Eq, Hash)] 309#[derive(Debug, Clone, PartialEq, Eq, Hash)]
310pub struct TypeParamList { 310pub struct GenericParamList {
311 pub(crate) syntax: SyntaxNode, 311 pub(crate) syntax: SyntaxNode,
312} 312}
313impl TypeParamList { 313impl GenericParamList {
314 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } 314 pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
315 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) } 315 pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) }
316 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) } 316 pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) }
@@ -557,7 +557,7 @@ pub struct ForType {
557} 557}
558impl ForType { 558impl ForType {
559 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } 559 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
560 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } 560 pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
561 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 561 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
562} 562}
563#[derive(Debug, Clone, PartialEq, Eq, Hash)] 563#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1172,7 +1172,7 @@ pub struct WherePred {
1172impl ast::TypeBoundsOwner for WherePred {} 1172impl ast::TypeBoundsOwner for WherePred {}
1173impl WherePred { 1173impl WherePred {
1174 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } 1174 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
1175 pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } 1175 pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
1176 pub fn lifetime_token(&self) -> Option<SyntaxToken> { 1176 pub fn lifetime_token(&self) -> Option<SyntaxToken> {
1177 support::token(&self.syntax, T![lifetime]) 1177 support::token(&self.syntax, T![lifetime])
1178 } 1178 }
@@ -1397,8 +1397,8 @@ pub enum AdtDef {
1397 UnionDef(UnionDef), 1397 UnionDef(UnionDef),
1398} 1398}
1399impl ast::AttrsOwner for AdtDef {} 1399impl ast::AttrsOwner for AdtDef {}
1400impl ast::GenericParamsOwner for AdtDef {}
1400impl ast::NameOwner for AdtDef {} 1401impl ast::NameOwner for AdtDef {}
1401impl ast::TypeParamsOwner for AdtDef {}
1402impl ast::VisibilityOwner for AdtDef {} 1402impl ast::VisibilityOwner for AdtDef {}
1403impl AstNode for SourceFile { 1403impl AstNode for SourceFile {
1404 fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } 1404 fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE }
@@ -1675,8 +1675,8 @@ impl AstNode for Abi {
1675 } 1675 }
1676 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1676 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1677} 1677}
1678impl AstNode for TypeParamList { 1678impl AstNode for GenericParamList {
1679 fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM_LIST } 1679 fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST }
1680 fn cast(syntax: SyntaxNode) -> Option<Self> { 1680 fn cast(syntax: SyntaxNode) -> Option<Self> {
1681 if Self::can_cast(syntax.kind()) { 1681 if Self::can_cast(syntax.kind()) {
1682 Some(Self { syntax }) 1682 Some(Self { syntax })
@@ -3583,7 +3583,7 @@ impl std::fmt::Display for Abi {
3583 std::fmt::Display::fmt(self.syntax(), f) 3583 std::fmt::Display::fmt(self.syntax(), f)
3584 } 3584 }
3585} 3585}
3586impl std::fmt::Display for TypeParamList { 3586impl std::fmt::Display for GenericParamList {
3587 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3587 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3588 std::fmt::Display::fmt(self.syntax(), f) 3588 std::fmt::Display::fmt(self.syntax(), f)
3589 } 3589 }