From 3daca3eb4d843199540edfb1092f57f49938d0f6 Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Mon, 28 Jan 2019 23:06:11 +0100 Subject: Infer type of match guard --- crates/ra_syntax/src/ast/generated.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/ast/generated.rs') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 3ace6533c..4f5a96014 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -1981,7 +1981,11 @@ impl ToOwned for MatchGuard { } -impl MatchGuard {} +impl MatchGuard { + pub fn expr(&self) -> Option<&Expr> { + super::child_opt(self) + } +} // MethodCallExpr #[derive(Debug, PartialEq, Eq, Hash)] -- cgit v1.2.3