aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs
index c76b7330c..efb424dae 100644
--- a/crates/ra_parser/src/grammar/expressions/atom.rs
+++ b/crates/ra_parser/src/grammar/expressions/atom.rs
@@ -92,6 +92,8 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar
92 T![loop] => loop_expr(p, Some(m)), 92 T![loop] => loop_expr(p, Some(m)),
93 T![for] => for_expr(p, Some(m)), 93 T![for] => for_expr(p, Some(m)),
94 T![while] => while_expr(p, Some(m)), 94 T![while] => while_expr(p, Some(m)),
95 // test labeled_block
96 // fn f() { 'label: {}; }
95 T!['{'] => { 97 T!['{'] => {
96 block_expr(p); 98 block_expr(p);
97 m.complete(p, EFFECT_EXPR) 99 m.complete(p, EFFECT_EXPR)
@@ -115,6 +117,8 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar
115 m.complete(p, EFFECT_EXPR) 117 m.complete(p, EFFECT_EXPR)
116 } 118 }
117 T![match] => match_expr(p), 119 T![match] => match_expr(p),
120 // test unsafe_block
121 // fn f() { unsafe { } }
118 T![unsafe] if la == T!['{'] => { 122 T![unsafe] if la == T!['{'] => {
119 let m = p.start(); 123 let m = p.start();
120 p.bump(T![unsafe]); 124 p.bump(T![unsafe]);
@@ -466,8 +470,6 @@ fn match_guard(p: &mut Parser) -> CompletedMarker {
466// test block_expr 470// test block_expr
467// fn foo() { 471// fn foo() {
468// {}; 472// {};
469// unsafe {};
470// 'label: {};
471// } 473// }
472pub(super) fn block_expr(p: &mut Parser) -> CompletedMarker { 474pub(super) fn block_expr(p: &mut Parser) -> CompletedMarker {
473 assert!(p.at(T!['{'])); 475 assert!(p.at(T!['{']));