aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs7
-rw-r--r--crates/ra_syntax/src/ast/traits.rs6
2 files changed, 5 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 90480b6ca..7f91417c5 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -3134,8 +3134,11 @@ impl AstNode for TryBlockExpr {
3134 &self.syntax 3134 &self.syntax
3135 } 3135 }
3136} 3136}
3137impl ast::TryBlockBodyOwner for TryBlockExpr {} 3137impl TryBlockExpr {
3138impl TryBlockExpr {} 3138 pub fn block(&self) -> Option<Block> {
3139 AstChildren::new(&self.syntax).next()
3140 }
3141}
3139#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3142#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3140pub struct TryExpr { 3143pub struct TryExpr {
3141 pub(crate) syntax: SyntaxNode, 3144 pub(crate) syntax: SyntaxNode,
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs
index 1b9a2b20c..20c251fba 100644
--- a/crates/ra_syntax/src/ast/traits.rs
+++ b/crates/ra_syntax/src/ast/traits.rs
@@ -33,12 +33,6 @@ pub trait LoopBodyOwner: AstNode {
33 } 33 }
34} 34}
35 35
36pub trait TryBlockBodyOwner: AstNode {
37 fn try_body(&self) -> Option<ast::Block> {
38 child_opt(self)
39 }
40}
41
42pub trait ArgListOwner: AstNode { 36pub trait ArgListOwner: AstNode {
43 fn arg_list(&self) -> Option<ast::ArgList> { 37 fn arg_list(&self) -> Option<ast::ArgList> {
44 child_opt(self) 38 child_opt(self)