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 @@ -214,6 +214,21 @@ fn test_expr() {
214
214
"match () { _ => ({ 1 }) - 1, }" ,
215
215
"match() { _ => { 1 } - 1 }" ,
216
216
) ;
217
+ c2_match_arm ! (
218
+ [ m!( ) - 1 ] ,
219
+ "match () { _ => m!() - 1, }" ,
220
+ "match() { _ => m!() - 1 }" ,
221
+ ) ;
222
+ c2_match_arm ! (
223
+ [ m![ ] - 1 ] ,
224
+ "match () { _ => m![] - 1, }" ,
225
+ "match() { _ => m![] - 1 }" ,
226
+ ) ;
227
+ c2_match_arm ! (
228
+ [ m! { } - 1 ] ,
229
+ "match () { _ => m! {} - 1, }" ,
230
+ "match() { _ => m! {} - 1 }" ,
231
+ ) ;
217
232
218
233
// ExprKind::Closure
219
234
c1 ! ( expr, [ || { } ] , "|| {}" ) ;
@@ -721,6 +736,21 @@ fn test_stmt() {
721
736
"(loop { break 1; }) - 1;" ,
722
737
"loop { break 1; } - 1" ,
723
738
) ;
739
+ c2_minus_one ! (
740
+ [ m!( ) ] ,
741
+ "m!() - 1;" ,
742
+ "m!() - 1"
743
+ ) ;
744
+ c2_minus_one ! (
745
+ [ m![ ] ] ,
746
+ "m![] - 1;" ,
747
+ "m![] - 1"
748
+ ) ;
749
+ c2_minus_one ! (
750
+ [ m! { } ] ,
751
+ "m! {} - 1;" , // FIXME(dtolnay): needs parens, otherwise this is 2 separate statements
752
+ "m! {} - 1"
753
+ ) ;
724
754
725
755
// StmtKind::Empty
726
756
c1 ! ( stmt, [ ; ] , ";" ) ;
You can’t perform that action at this time.
0 commit comments