1
Fork 0

[breaking-change] don't glob export ast::CaptureClause variants

This commit is contained in:
Oliver Schneider 2016-02-08 15:27:08 +01:00
parent 243a30c931
commit 8516ba367d
5 changed files with 17 additions and 17 deletions

View file

@ -883,14 +883,14 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
fn lambda_fn_decl(&self, span: Span,
fn_decl: P<ast::FnDecl>, blk: P<ast::Block>) -> P<ast::Expr> {
self.expr(span, ast::ExprClosure(ast::CaptureByRef, fn_decl, blk))
self.expr(span, ast::ExprClosure(ast::CaptureBy::Ref, fn_decl, blk))
}
fn lambda(&self, span: Span, ids: Vec<ast::Ident>, blk: P<ast::Block>) -> P<ast::Expr> {
let fn_decl = self.fn_decl(
ids.iter().map(|id| self.arg(span, *id, self.ty_infer(span))).collect(),
self.ty_infer(span));
self.expr(span, ast::ExprClosure(ast::CaptureByRef, fn_decl, blk))
self.expr(span, ast::ExprClosure(ast::CaptureBy::Ref, fn_decl, blk))
}
fn lambda0(&self, span: Span, blk: P<ast::Block>) -> P<ast::Expr> {
self.lambda(span, Vec::new(), blk)