diff options
| author | bors <bors@rust-lang.org> | 2017-01-08 02:10:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-08 02:10:26 +0000 |
| commit | 05383b2765fe6bb38ecf5f74f1b2d9bdf55df894 (patch) | |
| tree | 067d762c295c719c3877e38a40d524e820061b2b | |
| parent | 47c8d9fdcf2e6502cf4ca7d7f059fdc1a2810afa (diff) | |
| parent | 7883543100f98cd3d18e7006967b534fad0d2855 (diff) | |
| download | rust-05383b2765fe6bb38ecf5f74f1b2d9bdf55df894.tar.gz rust-05383b2765fe6bb38ecf5f74f1b2d9bdf55df894.zip | |
Auto merge of #38807 - comex:pprint-expr-attr, r=nrc
Print attributes on expressions when pretty printing.
Test case: `rustc -Z unstable-options --unpretty=hir <(echo 'fn main() { #[allow()] main() }')`
| -rw-r--r-- | src/librustc/hir/print.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc/hir/print.rs b/src/librustc/hir/print.rs index 18fa6836b51..c06c53810d7 100644 --- a/src/librustc/hir/print.rs +++ b/src/librustc/hir/print.rs @@ -1210,6 +1210,7 @@ impl<'a> State<'a> { pub fn print_expr(&mut self, expr: &hir::Expr) -> io::Result<()> { self.maybe_print_comment(expr.span.lo)?; + self.print_outer_attributes(&expr.attrs)?; self.ibox(indent_unit)?; self.ann.pre(self, NodeExpr(expr))?; match expr.node { |
