From a142beaf013a016a48eb9f193b55e0cbcb80b6a9 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 23 Dec 2020 12:24:24 +0100 Subject: Implement const block inference --- crates/syntax/src/ast/expr_ext.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/expr_ext.rs b/crates/syntax/src/ast/expr_ext.rs index e4a9b945c..636ce166d 100644 --- a/crates/syntax/src/ast/expr_ext.rs +++ b/crates/syntax/src/ast/expr_ext.rs @@ -358,6 +358,7 @@ pub enum Effect { Async(SyntaxToken), Unsafe(SyntaxToken), Try(SyntaxToken), + Const(SyntaxToken), // Very much not an effect, but we stuff it into this node anyway Label(ast::Label), } @@ -373,6 +374,9 @@ impl ast::EffectExpr { if let Some(token) = self.try_token() { return Effect::Try(token); } + if let Some(token) = self.const_token() { + return Effect::Const(token); + } if let Some(label) = self.label() { return Effect::Label(label); } -- cgit v1.2.3