File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,21 @@ fn test_expr() {
213213 "match () { _ => ({ 1 }) - 1, }" ,
214214 "match () { _ => { 1 } - 1 }" ,
215215 ) ;
216+ c2_match_arm ! (
217+ [ m!( ) - 1 ] ,
218+ "match () { _ => m!() - 1, }" ,
219+ "match () { _ => m!() - 1 }" ,
220+ ) ;
221+ c2_match_arm ! (
222+ [ m![ ] - 1 ] ,
223+ "match () { _ => m![] - 1, }" ,
224+ "match () { _ => m![] - 1 }" ,
225+ ) ;
226+ c2_match_arm ! (
227+ [ m! { } - 1 ] ,
228+ "match () { _ => m! {} - 1, }" ,
229+ "match () { _ => m! {} - 1 }" ,
230+ ) ;
216231
217232 // ExprKind::Closure
218233 c1 ! ( expr, [ || { } ] , "|| {}" ) ;
@@ -720,6 +735,21 @@ fn test_stmt() {
720735 "(loop { break 1; }) - 1;" ,
721736 "loop { break 1; } - 1" ,
722737 ) ;
738+ c2_minus_one ! (
739+ [ m!( ) ] ,
740+ "m!() - 1;" ,
741+ "m!() - 1"
742+ ) ;
743+ c2_minus_one ! (
744+ [ m![ ] ] ,
745+ "m![] - 1;" ,
746+ "m![] - 1"
747+ ) ;
748+ c2_minus_one ! (
749+ [ m! { } ] ,
750+ "m! {} - 1;" , // FIXME(dtolnay): needs parens, otherwise this is 2 separate statements
751+ "m! {} - 1"
752+ ) ;
723753
724754 // StmtKind::Empty
725755 c1 ! ( stmt, [ ; ] , ";" ) ;
You can’t perform that action at this time.
0 commit comments