diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2015-09-23 22:51:37 -0700 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2015-09-23 22:51:37 -0700 |
| commit | ed597a8059f4e04d2ab7caa9afd1b0ee8f66095c (patch) | |
| tree | c4f79df67f4ea3dc24f73673c2e8ee3678789dac /src/expr.rs | |
| parent | c14cfca0e3de3dfa5fd91d39a85c5b452e7756e3 (diff) | |
Exhaustively enumerate expressions in expression rewriting.
Diffstat (limited to 'src/expr.rs')
| -rw-r--r-- | src/expr.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/expr.rs b/src/expr.rs index 7bcf613b2e5..c1749668c57 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -155,7 +155,15 @@ impl Rewrite for ast::Expr { } // 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) + } } } } |
