Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/generated/nodes.rs')
-rw-r--r--crates/syntax/src/ast/generated/nodes.rs46
1 files changed, 4 insertions, 42 deletions
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs
index 6aa7efd832..61f6a04c98 100644
--- a/crates/syntax/src/ast/generated/nodes.rs
+++ b/crates/syntax/src/ast/generated/nodes.rs
@@ -121,6 +121,8 @@ impl ast::HasTypeBounds for AssocTypeArg {}
impl AssocTypeArg {
pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
pub fn generic_arg_list(&self) -> Option<GenericArgList> { support::child(&self.syntax) }
+ pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
+ pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
@@ -143,18 +145,6 @@ impl ConstArg {
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ReturnTypeArg {
- pub(crate) syntax: SyntaxNode,
-}
-impl ast::HasTypeBounds for ReturnTypeArg {}
-impl ReturnTypeArg {
- pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
- pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
- pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
- pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
-}
-
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct TypeBoundList {
pub(crate) syntax: SyntaxNode,
}
@@ -1528,7 +1518,6 @@ pub enum GenericArg {
AssocTypeArg(AssocTypeArg),
LifetimeArg(LifetimeArg),
ConstArg(ConstArg),
- ReturnTypeArg(ReturnTypeArg),
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1878,17 +1867,6 @@ impl AstNode for ConstArg {
}
fn syntax(&self) -> &SyntaxNode { &self.syntax }
}
-impl AstNode for ReturnTypeArg {
- fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_TYPE_ARG }
- fn cast(syntax: SyntaxNode) -> Option<Self> {
- if Self::can_cast(syntax.kind()) {
- Some(Self { syntax })
- } else {
- None
- }
- }
- fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
impl AstNode for TypeBoundList {
fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -3243,12 +3221,9 @@ impl From<LifetimeArg> for GenericArg {
impl From<ConstArg> for GenericArg {
fn from(node: ConstArg) -> GenericArg { GenericArg::ConstArg(node) }
}
-impl From<ReturnTypeArg> for GenericArg {
- fn from(node: ReturnTypeArg) -> GenericArg { GenericArg::ReturnTypeArg(node) }
-}
impl AstNode for GenericArg {
fn can_cast(kind: SyntaxKind) -> bool {
- matches!(kind, TYPE_ARG | ASSOC_TYPE_ARG | LIFETIME_ARG | CONST_ARG | RETURN_TYPE_ARG)
+ matches!(kind, TYPE_ARG | ASSOC_TYPE_ARG | LIFETIME_ARG | CONST_ARG)
}
fn cast(syntax: SyntaxNode) -> Option<Self> {
let res = match syntax.kind() {
@@ -3256,7 +3231,6 @@ impl AstNode for GenericArg {
ASSOC_TYPE_ARG => GenericArg::AssocTypeArg(AssocTypeArg { syntax }),
LIFETIME_ARG => GenericArg::LifetimeArg(LifetimeArg { syntax }),
CONST_ARG => GenericArg::ConstArg(ConstArg { syntax }),
- RETURN_TYPE_ARG => GenericArg::ReturnTypeArg(ReturnTypeArg { syntax }),
_ => return None,
};
Some(res)
@@ -3267,7 +3241,6 @@ impl AstNode for GenericArg {
GenericArg::AssocTypeArg(it) => &it.syntax,
GenericArg::LifetimeArg(it) => &it.syntax,
GenericArg::ConstArg(it) => &it.syntax,
- GenericArg::ReturnTypeArg(it) => &it.syntax,
}
}
}
@@ -4199,13 +4172,7 @@ impl AstNode for AnyHasTypeBounds {
fn can_cast(kind: SyntaxKind) -> bool {
matches!(
kind,
- ASSOC_TYPE_ARG
- | RETURN_TYPE_ARG
- | TRAIT
- | TYPE_ALIAS
- | LIFETIME_PARAM
- | TYPE_PARAM
- | WHERE_PRED
+ ASSOC_TYPE_ARG | TRAIT | TYPE_ALIAS | LIFETIME_PARAM | TYPE_PARAM | WHERE_PRED
)
}
fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -4368,11 +4335,6 @@ impl std::fmt::Display for ConstArg {
std::fmt::Display::fmt(self.syntax(), f)
}
}
-impl std::fmt::Display for ReturnTypeArg {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- std::fmt::Display::fmt(self.syntax(), f)
- }
-}
impl std::fmt::Display for TypeBoundList {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self.syntax(), f)