diff options
| author | bors <bors@rust-lang.org> | 2020-01-23 00:04:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-23 00:04:33 +0000 |
| commit | e23dd6687f7677a715765bff1fe5e63b906cb96b (patch) | |
| tree | 7bbb599260f76a958a7365f8e535bd418020253c /src/libsyntax | |
| parent | d1e594f4029c6ac8feb7c2acf9f9e04c1b9c493c (diff) | |
| parent | bfac73c0a6786644d0a58a12347839d442be26ac (diff) | |
| download | rust-e23dd6687f7677a715765bff1fe5e63b906cb96b.tar.gz rust-e23dd6687f7677a715765bff1fe5e63b906cb96b.zip | |
Auto merge of #68474 - tmandry:rollup-6gmbet6, r=tmandry
Rollup of 10 pull requests Successful merges: - #67195 ([experiment] Add `-Z no-link` flag) - #68253 (add bare metal ARM Cortex-A targets to rustc) - #68361 (Unbreak linking with lld 9 on FreeBSD 13.0-CURRENT i386) - #68388 (Make `TooGeneric` error in WF checking a proper error) - #68409 (Micro-optimize OutputFilenames) - #68410 (Export weak symbols used by MemorySanitizer) - #68425 (Fix try-op diagnostic in E0277 for methods) - #68440 (bootstrap: update clippy subcmd decription) - #68441 (pprust: use as_deref) - #68462 (librustc_mir: don't allocate vectors where slices will do.) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 3927e4f9030..f0ef33e2f62 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1645,7 +1645,7 @@ impl<'a> State<'a> { self.print_expr_as_cond(i); self.s.space(); self.print_block(then); - self.print_else(e.as_ref().map(|e| &**e)) + self.print_else(e.as_deref()) } // Final `else` block. ast::ExprKind::Block(ref b, _) => { @@ -1949,7 +1949,7 @@ impl<'a> State<'a> { self.print_let(pat, scrutinee); } ast::ExprKind::If(ref test, ref blk, ref elseopt) => { - self.print_if(test, blk, elseopt.as_ref().map(|e| &**e)); + self.print_if(test, blk, elseopt.as_deref()) } ast::ExprKind::While(ref test, ref blk, opt_label) => { if let Some(label) = opt_label { |
