Description
openedon Jan 27, 2023
This is a tracking issue for the next-generation trait solver in rustc. It can be enabled on nightly by using the -Znext-solver
flag. This work is lead by the @rust-lang/initiative-trait-system-refactor.
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Links
Original Types Team MCP: rust-lang/types-team#58
Types Team Tracking Issue: rust-lang/types-team#76
Types Team announcement and Roadmap: https://blog.rust-lang.org/2023/01/20/types-announcement.html
EOY 2023 Update Blog Post: https://blog.rust-lang.org/inside-rust/2023/12/22/trait-system-refactor-initiative.html
2024 Types Team Update Blog Post: https://blog.rust-lang.org/2024/06/26/types-team-update.html
Tracking issue for -Znext-solver=coherence
: #114862
Milestones and future work
For a complete list of changes, see the list of merged PRs. We also track the decisions we've made - and decisions we still have to make - in https://github.com/rust-lang/trait-system-refactor-initiative/issues. We mostly discuss these issues on zulip and in Types Team meetings.
Major milestones
- implement the skeleton of the updated trait solver #105661 initial skeleton of the trait solver
- -Ztrait-solver=next: stop depending on old solver #113317 full independence of the old trait solver implementation
- [experiment]
-Ztrait-solver=next-coherence
but hacks that make things not fail anymore #113991 initial crater run with-Znext-solver=coherence
- Rework negative coherence to properly consider impls that only partly overlap #112875 always use next-gen trait solver for
feature(with_negative_coherence)
, which is used while compiling the standard library - Implement T-types suggested logic for perfect non-local impl detection #122747 always use next-gen trait solver in the
non_local_definitions
lint - Uplift next trait solver to
rustc_next_trait_solver
#126614 uplift the next-generation trait solver into a separate library - stabilize
-Znext-solver=coherence
#121848 (reverted) stabilize-Znext-solver=coherence
again #130654 stabilize-Znext-solver=coherence
- bootstrap with
-Znext-solver=globally
- initial perf run with
-Znext-solver=globally
- initial crater run with
-Znext-solver=globally
- stabilize
-Znext-solver=globally