File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1651,9 +1651,18 @@ impl<'a> State<'a> {
16511651 }
16521652 }
16531653 ast:: StmtKind :: Semi ( ref expr) => {
1654- self . space_if_not_bol ( ) ;
1655- self . print_expr_outer_attr_style ( expr, false ) ;
1656- self . s . word ( ";" ) ;
1654+ match expr. node {
1655+ // Filter out empty `Tup` exprs created for the `redundant_semicolon`
1656+ // lint, as they shouldn't be visible and interact poorly
1657+ // with proc macros.
1658+ ast:: ExprKind :: Tup ( ref exprs) if exprs. is_empty ( )
1659+ && expr. attrs . is_empty ( ) => ( ) ,
1660+ _ => {
1661+ self . space_if_not_bol ( ) ;
1662+ self . print_expr_outer_attr_style ( expr, false ) ;
1663+ self . s . word ( ";" ) ;
1664+ }
1665+ }
16571666 }
16581667 ast:: StmtKind :: Mac ( ref mac) => {
16591668 let ( ref mac, style, ref attrs) = * * mac;
You can’t perform that action at this time.
0 commit comments