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.
This commit is contained in:
@@ -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)+)))");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user