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/0071_match_expr.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs') diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs index c9205dfa3..c4021dc10 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rs @@ -1,4 +1,6 @@ fn foo() { match () { }; match S {}; + match { } { _ => () }; + match { S {} } {}; } -- cgit v1.2.3