Description
This is a tracking issue for -Znext-solver=coherence
, and enabling the new solver in coherence mode. The -Znext-solver=coherence
flag can be used to only enable the new solver for coherence, or -Znext-solver
can be used to enable the new solver everywhere (see #107374 instead). 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.
Implementation history
- new solver cleanup + implement coherence #109447
- Warn on inductive cycle in coherence leading to impls being considered not overlapping #114023
- Add
-Ztrait-solver=next-coherence
#112122 - stabilize
-Znext-solver=coherence
#121848 - Revert "Stabilize
-Znext-solver=coherence
" #130249 - stabilize
-Znext-solver=coherence
again #130654
Crater runs
- [Experiment] Crater run with
-Ztrait-solver=next-coherence
#113895 - [experiment]
-Ztrait-solver=next-coherence
but hacks that make things not fail anymore #113991 - [crater] next-coherence crater part 2 #116357
Issues
- incorrect occurs check in projections generalization is incomplete for aliases trait-system-refactor-initiative#8 (fixed by generalize: handle occurs check failure in aliases #117088)
- intercrate ambiguity causes/proof tree work
- overflow handling
- normalize for diagnostics, add new folder to
TypeErrCtxt
or sth - experiment normalizing both sides in
AliasRElate
before equating (perf) - Blog post asking for testing and experimentation https://blog.rust-lang.org/inside-rust/2023/12/22/trait-system-refactor-initiative.html
- Investigate all the issues of the crater runs
- opaque auto trait leakage in coherence trait-system-refactor-initiative#65
- ambiguity on inductive cycles trait-system-refactor-initiative#20
- Ambiguity in
assemble_candidates_after_normalizing_self_ty
causes coherence error trait-system-refactor-initiative#52 accepted breakage, caused by a bug of the old solver coherence incorrectly considersunnormalizable_projection: Trait
to not hold even if it could #114061 - Trait ref is not considered knowable due to normalization trait-system-refactor-initiative#51
- work towards stabilization, writing an FCP proposal and documenting the solver https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/coherence.20stabilization
- stabilization PR in stabilize
-Znext-solver=coherence
#121848 - reverted in Revert "Stabilize
-Znext-solver=coherence
" #130249 due to Regression in nightly-2024-09-07: hang affectingnalgebra
#130056 - restabilize coherence: stabilize
-Znext-solver=coherence
again #130654