We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e31afd3 commit db3b85cCopy full SHA for db3b85c
src/libsyntax/print/pprust.rs
@@ -1657,9 +1657,18 @@ impl<'a> State<'a> {
1657
}
1658
1659
ast::StmtKind::Semi(ref expr) => {
1660
- self.space_if_not_bol();
1661
- self.print_expr_outer_attr_style(expr, false);
1662
- 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
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
1672
1673
ast::StmtKind::Mac(ref mac) => {
1674
let (ref mac, style, ref attrs) = **mac;
0 commit comments