Merge pull request #2407 from smanilov/patch-14

Add time reference and tracking info for trait system refactor
This commit is contained in:
Tshepang Mbambo 2025-05-26 18:49:20 +02:00 committed by GitHub
commit e05b494faa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -166,7 +166,10 @@ In this example:
When interfacing with the type system it will often be the case that it's necessary to request a type be normalized. There are a number of different entry points to the underlying normalization logic and each entry point should only be used in specific parts of the compiler. When interfacing with the type system it will often be the case that it's necessary to request a type be normalized. There are a number of different entry points to the underlying normalization logic and each entry point should only be used in specific parts of the compiler.
An additional complication is that the compiler is currently undergoing a transition from the old trait solver to the new trait solver. As part of this transition our approach to normalization in the compiler has changed somewhat significantly, resulting in some normalization entry points being "old solver only" slated for removal in the long-term once the new solver has stabilized. <!-- date-check: May 2025 -->
An additional complication is that the compiler is currently undergoing a transition from the old trait solver to the new trait solver.
As part of this transition our approach to normalization in the compiler has changed somewhat significantly, resulting in some normalization entry points being "old solver only" slated for removal in the long-term once the new solver has stabilized.
The transition can be tracked via the [WG-trait-system-refactor](https://github.com/rust-lang/rust/labels/WG-trait-system-refactor) label in Github.
Here is a rough overview of the different entry points to normalization in the compiler: Here is a rough overview of the different entry points to normalization in the compiler:
- `infcx.at.structurally_normalize` - `infcx.at.structurally_normalize`
@ -306,4 +309,4 @@ Const aliases differ from type aliases a bit here; well formedness of const alia
[^5]: Const aliases certainly wouldn't be *less* sound than type aliases if we stopped doing this [^5]: Const aliases certainly wouldn't be *less* sound than type aliases if we stopped doing this
[const_evaluatable]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.ClauseKind.html#variant.ConstEvaluatable [const_evaluatable]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.ClauseKind.html#variant.ConstEvaluatable