diff options
| author | bors <bors@rust-lang.org> | 2019-09-28 22:42:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-09-28 22:42:58 +0000 |
| commit | b61e69433951e31f7bd746e22f516a48ad41623b (patch) | |
| tree | 255b133e7b09bfc79a8a45a26d1ab4b66e700a76 /src/libsyntax | |
| parent | 488381ce9ef0ceabe83b73127c659e5d38137df0 (diff) | |
| parent | 46526718b15dd168543a59cb632bf8dea6eedafe (diff) | |
Auto merge of #64883 - Centril:rollup-uehjt63, r=Centril
Rollup of 10 pull requests Successful merges: - #64131 (data_structures: Add deterministic FxHashMap and FxHashSet wrappers) - #64387 (Fix redundant semicolon lint interaction with proc macro attributes) - #64678 (added more context for duplicate lang item errors (fixes #60561)) - #64763 (Add E0734 and its long explanation) - #64793 (Fix format macro expansions spans to be macro-generated) - #64837 (Improve wording in documentation of MaybeUninit) - #64852 (Print ParamTy span when accessing a field (#52082)) - #64875 (Upgrade async/await to "used" keywords.) - #64876 (Fix typo in intrinsics op safety) - #64880 (Slice docs: fix typo) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index a5792dab474..4b9c2d13f26 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1657,9 +1657,18 @@ impl<'a> State<'a> { } } ast::StmtKind::Semi(ref expr) => { - self.space_if_not_bol(); - self.print_expr_outer_attr_style(expr, false); - self.s.word(";"); + match expr.kind { + // Filter out empty `Tup` exprs created for the `redundant_semicolon` + // lint, as they shouldn't be visible and interact poorly + // with proc macros. + ast::ExprKind::Tup(ref exprs) if exprs.is_empty() + && expr.attrs.is_empty() => (), + _ => { + self.space_if_not_bol(); + self.print_expr_outer_attr_style(expr, false); + self.s.word(";"); + } + } } ast::StmtKind::Mac(ref mac) => { let (ref mac, style, ref attrs) = **mac; |
