Skip to content

Commit

Permalink
Auto merge of #117278 - lcnr:try-normalize-ty, r=compiler-errors
Browse files Browse the repository at this point in the history
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 rust-lang/trait-system-refactor-initiative#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 rust-lang/trait-system-refactor-initiative#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`
  • Loading branch information
bors committed Nov 17, 2023
2 parents e1913c0 + 61eb17f commit 7902e0a
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 7902e0a

Please sign in to comment.