Auto merge of #161268 - nnethercote:fix-160994, r=lcnr
Fix ordering for `default impl` check in the new solver The second commit of rust-lang/rust#160605 moved the `default impl` check later, for better performance, which introduced a regression. This commit moves the check a little earlier, so it is after the `args_may_unify` call (thus retaining the perf benefit) but before the `probe_trait_candidate` (which has side-effects). The check is now duplicated in three `GoalKind::consider_impl_candidate` methods, which is unfortunate, but it fits in with the existing duplicated code in those methods. And it means another copy of the check (in `try_assemble_bounds_via_registered_opaques`) can be removed. Fixes rust-lang/rust#160994. r? @lcnr
B
bors committed
3009fdd3756436133ed9ea6b165a655c28f6857a