We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3209951 commit 080a462Copy full SHA for 080a462
src/librustc/middle/typeck/check/mod.rs
@@ -2728,8 +2728,13 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
2728
});
2729
let mut bot_field = false;
2730
let mut err_field = false;
2731
+
2732
let elt_ts = do elts.mapi |i, e| {
- check_expr_with_opt_hint(fcx, *e, flds.map(|fs| fs[i]));
2733
+ let opt_hint = match flds {
2734
+ Some(ref fs) if i < fs.len() => Some(fs[i]),
2735
+ _ => None
2736
+ };
2737
+ check_expr_with_opt_hint(fcx, *e, opt_hint);
2738
let t = fcx.expr_ty(*e);
2739
err_field = err_field || ty::type_is_error(t);
2740
bot_field = bot_field || ty::type_is_bot(t);
0 commit comments