Skip to content

Commit 7ed556c

Browse files
committed
rustc: Check iter return types. Closes #638.
1 parent 2255eda commit 7ed556c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/comp/middle/typeck.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,8 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
17501750
}
17511751
case (some(?e)) {
17521752
check_expr(fcx, e);
1753+
demand::simple(fcx, expr.span, fcx.ret_ty,
1754+
expr_ty(fcx.ccx.tcx, e));
17531755
write::nil_ty(fcx.ccx.tcx, id);
17541756
}
17551757
}

0 commit comments

Comments
 (0)