From 9638adaa40d22adcf9b4002d95a13977c0f1436f Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Wed, 2 Oct 2019 23:38:03 -0700 Subject: Fix parsing of block expressions in "forbid_structs" contexts. Forbidding block expressions entirely is too strict; instead, we should only forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a range expression). --- crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs') diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs index 4b0d9af89..40f227ba3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rs @@ -3,4 +3,5 @@ fn foo() { if true {} else {}; if true {} else if false {} else {}; if S {}; + if { true } { } else { }; } -- cgit v1.2.3