Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection in the new solver #41

Open
lcnr opened this issue Jun 29, 2023 · 0 comments
Open

selection in the new solver #41

lcnr opened this issue Jun 29, 2023 · 0 comments

Comments

@lcnr
Copy link
Contributor

lcnr commented Jun 29, 2023

Selection is different from ordinary trait solving in that it returns a unique source used to prove a given trait goal. This is necessary for codegen and const evaluation. We also use it for unsize coercions and during method probing.

The exact coercion behavior is incredibly brittle which makes it difficult to diverge from the behavior the old select implementation without being forced to redesign unsize coercions. Fully redesigning that while remaining backwards compatible feels very challenging and would delay the removal of the old solver. Because of this we intend to closely match the existing behavior in select, even though that behavior is a mess.

winnowing in select

rust-lang/rust#113397 object bound over impl: needed for dyn Any to work

rematch for coercion

rust-lang/rust#113353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant