rustc: As an experiment, swap the expected/actual types when checking function arguments. Produces better diagnostics for arg-type-mismatch.rs.

This commit is contained in:
Patrick Walton 2010-11-23 10:22:52 -08:00
parent f2a7e712d3
commit 4208352527

View File

@ -695,8 +695,8 @@ fn unify(&fn_ctxt fcx, @ty expected, @ty actual) -> unify_result {
auto result = unify_step(fcx,
bindings,
expected_input.ty,
actual_input.ty);
actual_input.ty,
expected_input.ty);
alt (result) {
case (ures_ok(?rty)) {