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.
This commit is contained in:
parent
ae234d61ea
commit
523a088451
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user