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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue