diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-06-22 20:50:53 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-06-22 20:50:53 -0700 |
| commit | 523a0884511e11fa686badfca7c1aa7445761d7e (patch) | |
| tree | c71d451244da17d66f04f4f6c70363b2c290a47a /src/comp/middle | |
| parent | ae234d61eae736f2d5bfba2b223417be539a5936 (diff) | |
rustc: Use the rhs span when unifying binops
This makes the error message correctly identify the term that wasn't the expected type. Issue #516.
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/typeck.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 1ad5bb693a7..6b9d6cf2118 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1467,7 +1467,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) { auto lhs_t = expr_ty(fcx.ccx.tcx, lhs); auto rhs_t = expr_ty(fcx.ccx.tcx, rhs); - demand::autoderef(fcx, expr.span, lhs_t, rhs_t, AUTODEREF_OK); + demand::autoderef(fcx, rhs.span, lhs_t, rhs_t, AUTODEREF_OK); // FIXME: Binops have a bit more subtlety than this. |
