Perform coercions on LHS assignments.

This commit is contained in:
Niko Matsakis 2014-12-03 13:51:07 -05:00
parent 39be95c16b
commit 211782fef5
1 changed files with 1 additions and 1 deletions

View File

@ -3867,7 +3867,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
}
let lhs_ty = fcx.expr_ty(&**lhs);
check_expr_has_type(fcx, &**rhs, lhs_ty);
check_expr_coercable_to_type(fcx, &**rhs, lhs_ty);
let rhs_ty = fcx.expr_ty(&**rhs);
fcx.require_expr_have_sized_type(&**lhs, traits::AssignmentLhsSized);