diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 08:35:40 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 11:50:30 -0800 |
| commit | a02885e167bcc673208c45b5465dbec78ec8328d (patch) | |
| tree | 9c6b2b91098012462430e3d3fe92c9c344d4c36f /src/libsyntax/print/pprust.rs | |
| parent | b496adaefb440cbe01c3896bb1ef5ab1022227bb (diff) | |
| parent | 7d4e7f079552a524440d8b5fb656d52661592aee (diff) | |
| download | rust-a02885e167bcc673208c45b5465dbec78ec8328d.tar.gz rust-a02885e167bcc673208c45b5465dbec78ec8328d.zip | |
rollup merge of #19918: pnkfelix/ast-refactor-make-place-in-exprbox-an-option
This is to allow us to migrate away from UnUniq in a followup commit, and thus unify the code paths related to all forms of `box`.
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 18793525e82..cbbfcfef72e 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1501,7 +1501,7 @@ impl<'a> State<'a> { ast::ExprBox(ref p, ref e) => { try!(word(&mut self.s, "box")); try!(word(&mut self.s, "(")); - try!(self.print_expr(&**p)); + try!(p.as_ref().map_or(Ok(()), |e|self.print_expr(&**e))); try!(self.word_space(")")); try!(self.print_expr(&**e)); } |
