aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast
diff options
context:
space:
mode:
authorLenard Pratt <[email protected]>2019-03-30 11:17:31 +0000
committerLenard Pratt <[email protected]>2019-04-02 19:21:36 +0100
commit88e22e9d70ac3a35989ad1d45386f86697877c4c (patch)
tree274537eb5913369a7f226aca534fbf3821395181 /crates/ra_syntax/src/ast
parent7f3bf7cc738d02fde80d4fde9f32cbbe72896b87 (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.rs13
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 {}
629impl ast::AttrsOwner for ConstDef {} 629impl ast::AttrsOwner for ConstDef {}
630impl ast::DocCommentsOwner for ConstDef {} 630impl ast::DocCommentsOwner for ConstDef {}
631impl ast::TypeAscriptionOwner for ConstDef {} 631impl ast::TypeAscriptionOwner for ConstDef {}
632impl ConstDef {} 632impl 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
661impl ContinueExpr {} 664impl ContinueExpr {}
662 665
663// DynTraitType 666// DynTraitType
@@ -3808,7 +3811,11 @@ impl ast::TypeParamsOwner for StaticDef {}
3808impl ast::AttrsOwner for StaticDef {} 3811impl ast::AttrsOwner for StaticDef {}
3809impl ast::DocCommentsOwner for StaticDef {} 3812impl ast::DocCommentsOwner for StaticDef {}
3810impl ast::TypeAscriptionOwner for StaticDef {} 3813impl ast::TypeAscriptionOwner for StaticDef {}
3811impl StaticDef {} 3814impl 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)]