diff options
| author | Patrick Walton <[email protected]> | 2010-11-23 10:22:52 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-11-23 10:25:20 -0800 |
| commit | 4208352527a9c6a0541d89e2aea063e1e298a90e (patch) | |
| tree | b73c7502760d3e514c4718d0bbdcf4eb24a4d68e /src/comp | |
| parent | Remove warning about non-void expr stmts. (diff) | |
| download | rust-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')
| -rw-r--r-- | src/comp/middle/typeck.rs | 4 |
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)) { |