diff options
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 999023e3d..e8743caa8 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -523,6 +523,10 @@ impl<'a> FnDef<'a> { | |||
523 | pub fn body(self) -> Option<Block<'a>> { | 523 | pub fn body(self) -> Option<Block<'a>> { |
524 | super::child_opt(self) | 524 | super::child_opt(self) |
525 | } | 525 | } |
526 | |||
527 | pub fn ret_type(self) -> Option<RetType<'a>> { | ||
528 | super::child_opt(self) | ||
529 | } | ||
526 | } | 530 | } |
527 | 531 | ||
528 | // FnPointerType | 532 | // FnPointerType |
@@ -1412,6 +1416,24 @@ impl<'a> AstNode<'a> for ReferenceType<'a> { | |||
1412 | 1416 | ||
1413 | impl<'a> ReferenceType<'a> {} | 1417 | impl<'a> ReferenceType<'a> {} |
1414 | 1418 | ||
1419 | // RetType | ||
1420 | #[derive(Debug, Clone, Copy)] | ||
1421 | pub struct RetType<'a> { | ||
1422 | syntax: SyntaxNodeRef<'a>, | ||
1423 | } | ||
1424 | |||
1425 | impl<'a> AstNode<'a> for RetType<'a> { | ||
1426 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { | ||
1427 | match syntax.kind() { | ||
1428 | RET_TYPE => Some(RetType { syntax }), | ||
1429 | _ => None, | ||
1430 | } | ||
1431 | } | ||
1432 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | ||
1433 | } | ||
1434 | |||
1435 | impl<'a> RetType<'a> {} | ||
1436 | |||
1415 | // ReturnExpr | 1437 | // ReturnExpr |
1416 | #[derive(Debug, Clone, Copy)] | 1438 | #[derive(Debug, Clone, Copy)] |
1417 | pub struct ReturnExpr<'a> { | 1439 | pub struct ReturnExpr<'a> { |