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:
parent
3f3425a555
commit
c3b9047040
15 changed files with 30 additions and 57 deletions
|
@ -679,7 +679,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
|
|||
ast::Arm {
|
||||
pats: pats,
|
||||
guard: None,
|
||||
body: self.block_expr(expr)
|
||||
body: expr
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue