File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 78a0d380cc276116bd995bebbee10b0144d89432
2
+ refs/heads/master: 2d5b651f4981b85d0e3864d8df6bd0953578e1f4
Original file line number Diff line number Diff line change @@ -1605,8 +1605,11 @@ fn check_expr(fcx: &@fn_ctxt, expr: &@ast::expr) -> bool {
1605
1605
// A generic function for checking for or for-each loops
1606
1606
1607
1607
fn check_for_or_for_each ( fcx : & @fn_ctxt , local : & @ast:: local ,
1608
- element_ty : & ty:: t , body : & ast:: blk ,
1609
- node_id : ast:: node_id ) -> bool {
1608
+ element_ty : ty:: t , body : & ast:: blk ,
1609
+ node_id : ast:: node_id ) -> bool {
1610
+ let locid = lookup_local ( fcx, local. span , local. node . id ) ;
1611
+ element_ty = demand:: simple ( fcx, local. span , element_ty,
1612
+ ty:: mk_var ( fcx. ccx . tcx , locid) ) ;
1610
1613
let bot = check_decl_local ( fcx, local) ;
1611
1614
check_block ( fcx, body) ;
1612
1615
// Unify type of decl with element type of the seq
You can’t perform that action at this time.
0 commit comments