Skip to content

Commit 211782f

Browse files
committed
Perform coercions on LHS assignments.
1 parent 39be95c commit 211782f

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_typeck/check

1 file changed

+1
-1
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3867,7 +3867,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
38673867
}
38683868

38693869
let lhs_ty = fcx.expr_ty(&**lhs);
3870-
check_expr_has_type(fcx, &**rhs, lhs_ty);
3870+
check_expr_coercable_to_type(fcx, &**rhs, lhs_ty);
38713871
let rhs_ty = fcx.expr_ty(&**rhs);
38723872

38733873
fcx.require_expr_have_sized_type(&**lhs, traits::AssignmentLhsSized);

0 commit comments

Comments
 (0)