about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authornils <48135649+Nilstrieb@users.noreply.github.com>2022-12-23 18:02:13 +0100
committerGitHub <noreply@github.com>2022-12-23 18:02:13 +0100
commitfd5af8cc233cb70a776fd9653b11be7c56fdf78d (patch)
treed164cdfa4aa82f318e36ce4aec9726f5dd72d9ba /compiler/rustc_query_impl/src
parent62cc86924520f23091976655dab93b54a4c5ba21 (diff)
parent750bf36c33bb6d2d4d7fdc609020507e5f966037 (diff)
downloadrust-fd5af8cc233cb70a776fd9653b11be7c56fdf78d.tar.gz
rust-fd5af8cc233cb70a776fd9653b11be7c56fdf78d.zip
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
implement the skeleton of the updated trait solver

cc ```@rust-lang/initiative-trait-system-refactor```

This is mostly following the architecture discussed in the types team meetup.

After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.

This somewhat closely mirrors the current `evaluate` implementation with the following notable differences:
- it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)
- it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful)
- it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality)
- it is implemented to work with lazy normalization

A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.

r? ```@compiler-errors``` / ```@rust-lang/types``` :3
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions