Exhaustively enumerate expressions in expression rewriting.

This commit is contained in:
Eli Friedman
2015-09-23 22:51:37 -07:00
parent c14cfca0e3
commit ed597a8059
+9 -1
View File
@@ -155,7 +155,15 @@ fn rewrite(&self, context: &RewriteContext, width: usize, offset: Indent) -> Opt
}
// We do not format these expressions yet, but they should still
// satisfy our width restrictions.
_ => wrap_str(context.snippet(self.span), context.config.max_width, width, offset),
ast::Expr_::ExprBox(..) |
ast::Expr_::ExprCast(..) |
ast::Expr_::ExprIndex(..) |
ast::Expr_::ExprAddrOf(..) |
ast::Expr_::ExprRet(..) |
ast::Expr_::ExprInlineAsm(..) |
ast::Expr_::ExprRepeat(..) => {
wrap_str(context.snippet(self.span), context.config.max_width, width, offset)
}
}
}
}