Fix ordering for `default impl` check in the new solver
The second commit of #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 #160994.
N
Nicholas Nethercote committed
39b6dbec0617230ba45954f27fd6ff4431b44674
Parent: e702eca