diff options
author | Lenard Pratt <[email protected]> | 2019-03-30 11:17:31 +0000 |
---|---|---|
committer | Lenard Pratt <[email protected]> | 2019-04-02 19:21:36 +0100 |
commit | 88e22e9d70ac3a35989ad1d45386f86697877c4c (patch) | |
tree | 274537eb5913369a7f226aca534fbf3821395181 /crates/ra_syntax/src/ast | |
parent | 7f3bf7cc738d02fde80d4fde9f32cbbe72896b87 (diff) |
Added const bodies and static body to the ast
and added inference the inference test
reduce code duplication
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 31b4e73fb..84f39cda1 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -629,7 +629,11 @@ impl ast::TypeParamsOwner for ConstDef {} | |||
629 | impl ast::AttrsOwner for ConstDef {} | 629 | impl ast::AttrsOwner for ConstDef {} |
630 | impl ast::DocCommentsOwner for ConstDef {} | 630 | impl ast::DocCommentsOwner for ConstDef {} |
631 | impl ast::TypeAscriptionOwner for ConstDef {} | 631 | impl ast::TypeAscriptionOwner for ConstDef {} |
632 | impl ConstDef {} | 632 | impl ConstDef { |
633 | pub fn body(&self) -> Option<&Expr> { | ||
634 | super::child_opt(self) | ||
635 | } | ||
636 | } | ||
633 | 637 | ||
634 | // ContinueExpr | 638 | // ContinueExpr |
635 | #[derive(Debug, PartialEq, Eq, Hash)] | 639 | #[derive(Debug, PartialEq, Eq, Hash)] |
@@ -657,7 +661,6 @@ impl ToOwned for ContinueExpr { | |||
657 | } | 661 | } |
658 | 662 | ||
659 | 663 | ||
660 | |||
661 | impl ContinueExpr {} | 664 | impl ContinueExpr {} |
662 | 665 | ||
663 | // DynTraitType | 666 | // DynTraitType |
@@ -3808,7 +3811,11 @@ impl ast::TypeParamsOwner for StaticDef {} | |||
3808 | impl ast::AttrsOwner for StaticDef {} | 3811 | impl ast::AttrsOwner for StaticDef {} |
3809 | impl ast::DocCommentsOwner for StaticDef {} | 3812 | impl ast::DocCommentsOwner for StaticDef {} |
3810 | impl ast::TypeAscriptionOwner for StaticDef {} | 3813 | impl ast::TypeAscriptionOwner for StaticDef {} |
3811 | impl StaticDef {} | 3814 | impl StaticDef { |
3815 | pub fn body(&self) -> Option<&Expr> { | ||
3816 | super::child_opt(self) | ||
3817 | } | ||
3818 | } | ||
3812 | 3819 | ||
3813 | // Stmt | 3820 | // Stmt |
3814 | #[derive(Debug, PartialEq, Eq, Hash)] | 3821 | #[derive(Debug, PartialEq, Eq, Hash)] |