diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-06 13:58:28 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-06 13:58:28 +0100 |
commit | ba3148159974b4fa7a2e37ade3a79ba5eeb4e760 (patch) | |
tree | b5b9eb1151c6fdbfcbeeaaf4dfd2b2db015a6266 /crates/ra_syntax/src/ast/traits.rs | |
parent | b79e6294a68fd41f0a3dbd9eb907dfe99646d77e (diff) | |
parent | 505b8d873ffe422358bb4ff47dc82d6c76d0772e (diff) |
Merge #1380
1380: [#1083] Try block syntax r=matklad a=andreytkachenko
The `try` block syntax
Co-authored-by: Andrey Tkachenko <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/traits.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/traits.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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 { | |||
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | pub trait TryBlockBodyOwner: AstNode { | ||
37 | fn try_body(&self) -> Option<&ast::Block> { | ||
38 | child_opt(self) | ||
39 | } | ||
40 | } | ||
41 | |||
36 | pub trait ArgListOwner: AstNode { | 42 | pub trait ArgListOwner: AstNode { |
37 | fn arg_list(&self) -> Option<&ast::ArgList> { | 43 | fn arg_list(&self) -> Option<&ast::ArgList> { |
38 | child_opt(self) | 44 | child_opt(self) |