option: rewrite the API to use composition
This commit is contained in:
parent
f647ccc79c
commit
6a90e80b62
80 changed files with 244 additions and 277 deletions
|
@ -663,7 +663,7 @@ impl AstBuilder for @ExtCtxt {
|
|||
|
||||
fn expr_if(&self, span: Span,
|
||||
cond: @ast::Expr, then: @ast::Expr, els: Option<@ast::Expr>) -> @ast::Expr {
|
||||
let els = els.map_move(|x| self.expr_block(self.block_expr(x)));
|
||||
let els = els.map(|x| self.expr_block(self.block_expr(x)));
|
||||
self.expr(span, ast::ExprIf(cond, self.block_expr(then), els))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue