aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-11-23 10:22:52 -0800
committerPatrick Walton <[email protected]>2010-11-23 10:25:20 -0800
commit4208352527a9c6a0541d89e2aea063e1e298a90e (patch)
treeb73c7502760d3e514c4718d0bbdcf4eb24a4d68e /src/comp/middle
parentRemove warning about non-void expr stmts. (diff)
downloadrust-4208352527a9c6a0541d89e2aea063e1e298a90e.tar.xz
rust-4208352527a9c6a0541d89e2aea063e1e298a90e.zip
rustc: As an experiment, swap the expected/actual types when checking function arguments. Produces better diagnostics for arg-type-mismatch.rs.
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/typeck.rs4
1 files changed, 2 insertions, 2 deletions
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)) {