aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-02 00:57:21 +0100
committerAleksey Kladov <[email protected]>2020-05-02 10:21:39 +0100
commit623faefcda3536185232be1676709b0233bb10ba (patch)
treeae6ebf582326ff8743f03dbf208c7456627db0c4 /crates/ra_parser
parent642a3392d94b85cf5802cef9ceaa3de7e4571680 (diff)
Cleanup inline tests
Diffstat (limited to 'crates/ra_parser')
-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!['{']));