From 281c9eeaff8eac4e666089f80f67cf684e1d001b Mon Sep 17 00:00:00 2001 From: Andrey Tkachenko Date: Thu, 6 Jun 2019 15:36:16 +0400 Subject: [#1083] Try block syntax --- crates/ra_syntax/src/ast/traits.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_syntax/src/ast/traits.rs') diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs index 1c90cf148..433485400 100644 --- a/crates/ra_syntax/src/ast/traits.rs +++ b/crates/ra_syntax/src/ast/traits.rs @@ -33,6 +33,12 @@ pub trait LoopBodyOwner: AstNode { } } +pub trait TryBlockBodyOwner: AstNode { + fn try_body(&self) -> Option<&ast::Block> { + child_opt(self) + } +} + pub trait ArgListOwner: AstNode { fn arg_list(&self) -> Option<&ast::ArgList> { child_opt(self) -- cgit v1.2.3