diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2014-12-16 14:30:30 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2014-12-16 14:30:30 +0100 |
| commit | 7d4e7f079552a524440d8b5fb656d52661592aee (patch) | |
| tree | 45dce48e2a077271d9f2c92a06c1b33d17982f0e /src/libsyntax/print | |
| parent | 41f5907fa6b04614821277dd63172c5c8f11b6cd (diff) | |
| download | rust-7d4e7f079552a524440d8b5fb656d52661592aee.tar.gz rust-7d4e7f079552a524440d8b5fb656d52661592aee.zip | |
AST refactor: make the 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')
| -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 db122f271a9..4f45b69883b 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1495,7 +1495,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)); } |
