2023-08-04 rustc trait system refactor updatefor more information, check out the implementation tracking issue #107374, or the Trait System Refactor Initiative Issue Tracker. These updates are from my perspective and are not the official stance of the initiative. They exist to bridge the gap between major progress updates via rust-lang blog posts and the passive status tracking via the tracking issue and the initiative GitHub repository.
I pretty much exclusively focussed on overflow handling this week. I finished the implementation of the new approach in #114287 which should get merged over the next few days. I still have to take the design document and add it to the rustc-dev-guide after cleaning it up.
I also found another unrelated issue where the results of the trait solver are unstable. i.e. proving a goal, applying the returned constraints, and then proving it again adds different constraints or has a different certainty (trait-solver-refactor-initiative#54).
We have a
debug_assert for this in the solver right now (source). While this assertion has already helped us discover some issues here, it is triggered somewhat frequently and we may have to remove it at some point as some of its causes end up being unavoidable. We definitely still have to make it more permissive, e.g. consider our handling of guaranteed errors. It can result in a different certainty after applying the constraints from another candidate. This is acceptable as it only affects sessions which are already failing.
I opened a PR to lazily normalize in
trait_ref_is_knowable, fixing one of the regressions found via crater last week (#114457). There were also a few smaller fixes and improvements, see the list of PRs merged this week.