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/0080_postfix_range.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs') diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs index c39fe8e68..e7b7cfc6b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rs @@ -1 +1,5 @@ -fn foo() { let x = 1..; } +fn foo() { + let x = 1..; + match 1.. { _ => () }; + match a.b()..S { _ => () }; +} -- cgit v1.2.3