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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user