diff options
author | bravomikekilo <[email protected]> | 2019-08-14 14:20:04 +0100 |
---|---|---|
committer | bravomikekilo <[email protected]> | 2019-08-14 14:20:04 +0100 |
commit | 4f31fed362e1bb08f748b188eedc0bdc5a070bee (patch) | |
tree | 104dad5eb640cb992b984191ea70b3259d8535fb /crates/ra_parser/src | |
parent | 3fce56280feeb7d621cd98a61c6157393be72c00 (diff) |
fix test position
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 6e25e3cb4..50c70b3b3 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -111,6 +111,12 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar | |||
111 | block_expr(p, Some(m)) | 111 | block_expr(p, Some(m)) |
112 | } | 112 | } |
113 | T!['{'] => { | 113 | T!['{'] => { |
114 | // test for_range_from | ||
115 | // fn foo() { | ||
116 | // for x in 0 .. { | ||
117 | // break; | ||
118 | // } | ||
119 | // } | ||
114 | if r.forbid_structs { | 120 | if r.forbid_structs { |
115 | return None; | 121 | return None; |
116 | } else { | 122 | } else { |
@@ -313,16 +319,6 @@ fn while_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | |||
313 | // fn foo() { | 319 | // fn foo() { |
314 | // for x in [] {}; | 320 | // for x in [] {}; |
315 | // } | 321 | // } |
316 | |||
317 | // test for_range_block | ||
318 | // fn foo() { | ||
319 | // for x in 0 .. { | ||
320 | // break; | ||
321 | // } | ||
322 | // for _x in 0 .. (0 .. {1 + 2}).sum::<u32>() { | ||
323 | // break; | ||
324 | // } | ||
325 | // } | ||
326 | fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | 322 | fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { |
327 | assert!(p.at(T![for])); | 323 | assert!(p.at(T![for])); |
328 | let m = m.unwrap_or_else(|| p.start()); | 324 | let m = m.unwrap_or_else(|| p.start()); |