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`.
This commit is contained in:
Alex Crichton
2014-12-17 08:35:40 -08:00
11 changed files with 35 additions and 25 deletions

View File

@@ -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));
}