diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-03-03 18:41:47 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-03-03 22:48:42 +1100 |
| commit | c3b904704031047ef9e1f7906d3faee15778ffe5 (patch) | |
| tree | c5effad359313654e966bdac21a1b6767010c94f /src/libsyntax/fold.rs | |
| parent | 3f3425a5550e7d8b58d782425b09eab20b91c1c0 (diff) | |
syntax: make match arms store the expr directly.
Previously `ast::Arm` was always storing a single `ast::Expr` wrapped in an `ast::Block` (for historical reasons, AIUI), so we might as just store that expr directly. Closes #3085.
Diffstat (limited to 'src/libsyntax/fold.rs')
| -rw-r--r-- | src/libsyntax/fold.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index b01ba7718ba..e5b90393e0a 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -117,7 +117,7 @@ pub trait Folder { Arm { pats: a.pats.map(|x| self.fold_pat(*x)), guard: a.guard.map(|x| self.fold_expr(x)), - body: self.fold_block(a.body), + body: self.fold_expr(a.body), } } @@ -933,4 +933,3 @@ mod test { ~"zz!zz((zz$zz:zz$(zz $zz:zz)zz+=>(zz$(zz$zz$zz)+)))"); } } - |
