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 @@ -1657,9 +1657,18 @@ impl<'a> State<'a> {
16571657 }
16581658 }
16591659 ast:: StmtKind :: Semi ( ref expr) => {
1660- self . space_if_not_bol ( ) ;
1661- self . print_expr_outer_attr_style ( expr, false ) ;
1662- self . s . word ( ";" ) ;
1660+ match expr. kind {
1661+ // Filter out empty `Tup` exprs created for the `redundant_semicolon`
1662+ // lint, as they shouldn't be visible and interact poorly
1663+ // with proc macros.
1664+ ast:: ExprKind :: Tup ( ref exprs) if exprs. is_empty ( )
1665+ && expr. attrs . is_empty ( ) => ( ) ,
1666+ _ => {
1667+ self . space_if_not_bol ( ) ;
1668+ self . print_expr_outer_attr_style ( expr, false ) ;
1669+ self . s . word ( ";" ) ;
1670+ }
1671+ }
16631672 }
16641673 ast:: StmtKind :: Mac ( ref mac) => {
16651674 let ( ref mac, style, ref attrs) = * * mac;
You can’t perform that action at this time.
0 commit comments