Repository navigation
Tracking Issue for -Znext-solver #107374
Description
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
EOY 2024 Update Blog Post: https://blog.rust-lang.org/inside-rust/2024/12/04/trait-system-refactor-initiative.html
-Znext-solver=globally project board: -Znext-solver=globally
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-coherencebut 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_definitionslint - 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=coherenceagain #130654 stabilize-Znext-solver=coherence - [DO NOT MERGE]
-Znext-solver=globallyexperiments #133502 bootstrap with-Znext-solver=globally - [DO NOT MERGE]
-Znext-solver=globallyexperiments #133502 (comment) initial perf run with-Znext-solver=globally - initial crater run with
-Znext-solver=globally - fix remaining known issues -Znext-solver=globally
- write stabilization documents, cycle handling RFC
- stabilize
-Znext-solver=globally
Activity
alex commentedon Jul 13, 2023
Is it useful to file bugs with crates that don't compile under
-Ztrait-solver=next? (Specifically with an error ofnot implemented: overflowed on pending obligations)lcnr commentedon Jul 13, 2023
not yet as there are still a lot of failing crates with the new solver. will probably make an announcement blog post asking for testing once we're able to successfully compile our own tests and did the first crater run.
[-]Tracking Issue for `-Ztrait-solver=next`[/-][+]Tracking Issue for `-Znext-solver`[/+]ItsRedly commentedon Mar 30, 2025
lcnr commentedon Mar 31, 2025
umbrageodotus commentedon Oct 11, 2025
slanterns commentedon Oct 11, 2025
umbrageodotus commentedon Oct 11, 2025
zesterer commentedon Dec 11, 2025
Is this feature at the point where reporting major performance regressions is useful, or should I hold fire for now?
lcnr commentedon Dec 11, 2025
Yeah, we're still aware of a few major performance regressions ourselves, but do open a new issue for yours please.