rust/tests/ui/traits/new-solver
bors 78efca8845 Auto merge of #117278 - lcnr:try-normalize-ty, r=compiler-errors
new solver normalization improvements

cool beans

At the core of this PR is a `try_normalize_ty` which stops for rigid aliases by using `commit_if_ok`.

Reworks alias-relate to fully normalize both the lhs and rhs and then equate the resulting rigid (or inference) types. This fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/68 by avoiding the exponential blowup. Also supersedes #116369 by only defining opaque types if the hidden type is rigid.

I removed the stability check in `EvalCtxt::evaluate_goal` due to https://github.com/rust-lang/trait-system-refactor-initiative/issues/75. While I personally have opinions on how to fix it, that still requires further t-types/`@nikomatsakis` buy-in, so I removed that for now. Once we've decided on our approach there, we can revert this commit.

r? `@compiler-errors`
2023-11-17 10:16:41 +00:00
..
alias-relate
assembly
coherence
cycles
generalize
overflow
alias_eq_cant_be_furthur_normalized.rs
alias_eq_dont_use_normalizes_to_if_substs_eq.rs
alias_eq_simple.rs
alias_eq_substs_eq_not_intercrate.rs
alias_eq_substs_eq_not_intercrate.stderr
alias-bound-preference.rs
alias-bound-unsound.rs
alias-bound-unsound.stderr
alias-eq-in-canonical-response.rs
alias-sub.rs
array-default.rs
async.fail.stderr
async.rs
auto-with-drop_tracking_mir.fail.stderr
auto-with-drop_tracking_mir.rs
borrowck-error.rs
borrowck-error.stderr
builtin-fn-must-return-sized.rs
builtin-fn-must-return-sized.stderr
canonical-int-var-eq-in-response.rs
canonical-ty-var-eq-in-response.rs
canonicalize-effect-var.rs
cast-checks-handling-projections.rs
closure-inference-guidance.rs
closure-substs-ambiguity.rs
const-param-placeholder.fail.stderr
const-param-placeholder.rs
coroutine.fail.stderr
coroutine.rs
deduce-closure-signature-after-normalization.rs
deduce-ty-from-object.rs
dedup-regions.rs
destruct.rs
dont-coerce-infer-to-dyn.rs
dont-elaborate-for-projections.rs
dont-ice-on-assoc-projection.rs
dont-ice-on-assoc-projection.stderr
dont-loop-fulfill-on-region-constraints.rs
dont-normalize-proj-with-error.rs
dont-normalize-proj-with-error.stderr
dont-remap-tait-substs.rs
dont-type_of-tait-in-defining-scope.not_send.stderr
dont-type_of-tait-in-defining-scope.rs
dyn-any-dont-prefer-impl.rs
elaborate-item-bounds.rs
equating-projection-cyclically.rs
equating-projection-cyclically.stderr
escaping-bound-vars-in-writeback-normalization.rs
float-canonical.rs
fn-trait-closure.rs
fn-trait.rs
fn-trait.stderr
higher-ranked-dyn-bounds.rs
int-var-alias-eq.rs
int-var-is-send.rs
iter-filter-projection.rs
lazy-nested-obligations-1.rs
lazy-nested-obligations-2.rs
lazy-nested-obligations-3.rs
member-constraints-in-root-universe.rs
more-object-bound.rs
more-object-bound.stderr
negative-coherence-bounds.rs
negative-coherence-bounds.stderr
nested-alias-bound.rs
nested-obligations-with-bound-vars-gat.rs
normalize-async-closure-in-trait.rs
normalize-param-env-1.rs
normalize-param-env-2.rs
normalize-param-env-3.rs
normalize-rcvr-for-inherent.rs
normalize-unsize-rhs.rs
normalized-const-built-in-op.rs
normalizes_to_ignores_unnormalizable_candidate.rs
normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
object-soundness-requires-generalization.rs
object-unsafety.rs
object-unsafety.stderr
opportunistic-region-resolve.rs
param-candidate-doesnt-shadow-project.rs
param-discr-kind.rs
pointee.rs
pointer-like.rs
pointer-like.stderr
prefer-candidate-no-constraints.rs
prefer-param-env-on-ambiguity.rs
projection-discr-kind.rs
projection-discr-kind.stderr
slice-match-byte-lit.rs
specialization-transmute.rs
specialization-transmute.stderr
specialization-unconstrained.rs
specialization-unconstrained.stderr
stall-num-var-auto-trait.fallback.stderr
stall-num-var-auto-trait.rs
structural-resolve-field.rs
tait-eq-proj-2.rs
tait-eq-proj.rs
tait-eq-tait.rs
temporary-ambiguity.rs
trait-upcast-lhs-needs-normalization.rs
try-example.rs
two-projection-param-candidates-are-ambiguous.rs
two-projection-param-candidates-are-ambiguous.stderr
unevaluated-const-impl-trait-ref.fails.stderr
unevaluated-const-impl-trait-ref.rs
unsafe-auto-trait-impl.rs
unsize-although-ambiguous.rs
unsize-good.rs
upcast-right-substs.rs
upcast-wrong-substs.rs
upcast-wrong-substs.stderr
winnow-specializing-impls.rs