1
Fork 0
rust/compiler/rustc_trait_selection/src
Jacob Pratt fcb0e9d07a
Rollup merge of #123363 - lcnr:normalizes-to-zero-to-inf, r=BoxyUwU
change `NormalizesTo` to fully structurally normalize

notes in https://hackmd.io/wZ016dE4QKGIhrOnHLlThQ

need to also update the dev-guide once this PR lands. in short, the setup is now as follows:

`normalizes-to` internally implements one step normalization, applying that normalization to the `goal.predicate.term` causes the projected term to get recursively normalized. With this `normalizes-to` normalizes until the projected term is rigid, meaning that we normalize as many steps necessary, but at least 1.

To handle rigid aliases, we add another candidate only if the 1 to inf step normalization failed. With this `normalizes-to` is now full structural normalization. We can now change `AliasRelate` to simply emit `normalizes-to` goals for the rhs and lhs.

This avoids the concerns from https://github.com/rust-lang/trait-system-refactor-initiative/issues/103 and generally feels cleaner
2024-04-04 21:16:56 -04:00
..
solve Rollup merge of #123363 - lcnr:normalizes-to-zero-to-inf, r=BoxyUwU 2024-04-04 21:16:56 -04:00
traits Auto merge of #121394 - oli-obk:define_opaque_types, r=compiler-errors 2024-04-04 17:42:07 +00:00
errors.rs Rename AddToDiagnostic as Subdiagnostic. 2024-03-11 10:04:49 +11:00
infer.rs Remove EvaluatedToErrStackDependent 2024-03-31 20:44:30 -04:00
lib.rs Check x86_64 size assertions on aarch64, too 2024-04-03 16:53:03 +11:00
regions.rs Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00