From 4208352527a9c6a0541d89e2aea063e1e298a90e Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 23 Nov 2010 10:22:52 -0800 Subject: rustc: As an experiment, swap the expected/actual types when checking function arguments. Produces better diagnostics for arg-type-mismatch.rs. --- src/comp/middle/typeck.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp') diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 49bdf690..6a5351fa 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -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)) { -- cgit v1.2.3