2023-11-10 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.

I unfortunately forgot to write an update last week. I’ve finished the rework of the way we handle alias-relate goals. The PR is now ready and waiting for review: #117278. This rework seems quite promising and I am happy with the results.

While working on this I encountered a subtle issue where invariants we’d like to hold conflict and opened trait-system-refactor-initiative#75 for it. I still have to improve my understanding of the exact constraints at play here and improve the wording of that issue. When talking about invariants it’s suboptimal to avoid details. We discussed that problem in a types team meeting on monday (zulip). While I have some ideas on how to handle this, this definitely requires some further consideration.

I also changed proof tree generation to also use the global cache in #117394. The trait solver relies on the global cache to avoid hangs, so not using it while computing a goal is less than ideal.

I also took another look at type-system-chess. It previously compiled with the new solver but it now hangs. This change was caused by the removal of the provisional cache, which I previously expected to not be relevant. I still want to minimize the pattern causing the hang and have a lot of thoughts and ideas here.

There haven’t been many other changes to the new solver, see the full list of relevant PRs.

if you find any typos or errors in this post, please pm me on zulip, discord or cohost

back

impressum rss