From 4f2134cc33f07c09fe166cec42971828843bc0ef Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 2 May 2020 01:18:19 +0200 Subject: Introduce EffectExpr --- crates/ra_syntax/src/ast/make.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/ast/make.rs') diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 492088353..b9a396cad 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs @@ -82,10 +82,10 @@ pub fn block_expr( ast_from_text(&format!("fn f() {}", buf)) } -pub fn block_from_expr(e: ast::Expr) -> ast::Block { +pub fn block_from_expr(e: ast::Expr) -> ast::BlockExpr { return from_text(&format!("{{ {} }}", e)); - fn from_text(text: &str) -> ast::Block { + fn from_text(text: &str) -> ast::BlockExpr { ast_from_text(&format!("fn f() {}", text)) } } -- cgit v1.2.3