]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #40863 - eddyb:coerce-only-once, r=arielb1
authorbors <bors@rust-lang.org>
Thu, 6 Apr 2017 20:15:17 +0000 (20:15 +0000)
committerbors <bors@rust-lang.org>
Thu, 6 Apr 2017 20:15:17 +0000 (20:15 +0000)
Avoid type-checking addition and indexing twice.

Fixes #40610 by moving the common `check_expr_coercable_to_type` call before the error reporting logic for binops and removing the one from `check_str_addition`.
Fixes #40861 by removing an unnecessary `check_expr_coercable_to_type` call.


Trivial merge