allow for loop bodies
This commit is contained in:
parent
653a1f8781
commit
79b3dedac3
2 changed files with 22 additions and 1 deletions
|
|
@ -654,7 +654,7 @@ impl methods for check_loan_ctxt {
|
|||
self.fn_args.contains(did.node);
|
||||
if is_fn_arg { ret; } // case (a) above
|
||||
}
|
||||
ast::expr_fn_block(*) | ast::expr_fn(*) {
|
||||
ast::expr_fn_block(*) | ast::expr_fn(*) | ast::expr_loop_body(*) {
|
||||
if self.is_stack_closure(expr.id) { ret; } // case (b) above
|
||||
}
|
||||
_ {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue