2023-09-29 rustc trait system refactor update
for 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.This week has been fairly slow, as I spent quite a lot of time on fairly involved reviews and discussions. I started working on trait-system-refactor-initiative#1 and opened a draft PR (#116262).
This PR unfortunately uncovers some far more involved issues with generalization. Generalization is broken when dealing with aliases (trait-system-refactor-initiative#8). As the old trait solver eagerly normalizes projections and replaces ambiguous ones with inference variables where possible, it triggers them far less frequently. However, it is still affected, causing a mostly theoretical coherence unsoundness (#105787).
I will probably accept these issues for now and fix them at a later point. Any fix here could very easily result in unexpected breakage. I would like to delay that work until we are able to get meaningful crater results with -Ztrait-solver=next
.
As we’ve mostly focussed on other things, we did not merge any significant solver PRs this week.
if you find any typos or errors in this post, please pm me on zulip, discord or cohost