aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs
index 401c738a3..bc942ae01 100644
--- a/crates/ra_parser/src/grammar/expressions/atom.rs
+++ b/crates/ra_parser/src/grammar/expressions/atom.rs
@@ -110,7 +110,19 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar
110 p.bump(); 110 p.bump();
111 block_expr(p, Some(m)) 111 block_expr(p, Some(m))
112 } 112 }
113 T!['{'] => block_expr(p, None), 113 T!['{'] => {
114 // test for_range_from
115 // fn foo() {
116 // for x in 0 .. {
117 // break;
118 // }
119 // }
120 if r.forbid_structs {
121 return None;
122 } else {
123 block_expr(p, None)
124 }
125 }
114 T![return] => return_expr(p), 126 T![return] => return_expr(p),
115 T![continue] => continue_expr(p), 127 T![continue] => continue_expr(p),
116 T![break] => break_expr(p, r), 128 T![break] => break_expr(p, r),