Treat new blocks like existing ones in closures

Fixes #1355
This commit is contained in:
Nick Cameron 2017-03-07 14:30:01 +13:00
parent b9ab3ef9da
commit 981b031c9f
2 changed files with 3 additions and 3 deletions

View File

@ -494,7 +494,7 @@ fn rewrite_closure(capture: ast::CaptureBy,
rules: ast::BlockCheckMode::Default,
span: body.span,
};
return rewrite_closure_block(&block, prefix, context, body_shape.block());
return rewrite_closure_block(&block, prefix, context, body_shape);
fn rewrite_closure_expr(expr: &ast::Expr,
prefix: &str,

View File

@ -292,6 +292,6 @@ fn issue1106() {
}
for entry in WalkDir::new(path).into_iter().filter_entry(|entry| {
exclusions.filter_entry(entry)
}) {}
exclusions.filter_entry(entry)
}) {}
}