We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe6d05a commit e608549Copy full SHA for e608549
src/libsyntax/print/pprust.rs
@@ -1651,9 +1651,18 @@ impl<'a> State<'a> {
1651
}
1652
1653
ast::StmtKind::Semi(ref expr) => {
1654
- self.space_if_not_bol();
1655
- self.print_expr_outer_attr_style(expr, false);
1656
- self.s.word(";");
+ match expr.node {
+ // Filter out empty `Tup` exprs created for the `redundant_semicolon`
+ // 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
1666
1667
ast::StmtKind::Mac(ref mac) => {
1668
let (ref mac, style, ref attrs) = **mac;
0 commit comments