From 623faefcda3536185232be1676709b0233bb10ba Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 2 May 2020 01:57:21 +0200 Subject: Cleanup inline tests --- crates/ra_parser/src/grammar/expressions/atom.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_parser/src') 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 T![loop] => loop_expr(p, Some(m)), T![for] => for_expr(p, Some(m)), T![while] => while_expr(p, Some(m)), + // test labeled_block + // fn f() { 'label: {}; } T!['{'] => { block_expr(p); m.complete(p, EFFECT_EXPR) @@ -115,6 +117,8 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar m.complete(p, EFFECT_EXPR) } T![match] => match_expr(p), + // test unsafe_block + // fn f() { unsafe { } } T![unsafe] if la == T!['{'] => { let m = p.start(); p.bump(T![unsafe]); @@ -466,8 +470,6 @@ fn match_guard(p: &mut Parser) -> CompletedMarker { // test block_expr // fn foo() { // {}; -// unsafe {}; -// 'label: {}; // } pub(super) fn block_expr(p: &mut Parser) -> CompletedMarker { assert!(p.at(T!['{'])); -- cgit v1.2.3