Skip to content

changed how we arbitrarily choose candidates for trait goals #11

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

Closed
lcnr opened this issue Apr 17, 2023 · 2 comments
Closed

changed how we arbitrarily choose candidates for trait goals #11

lcnr opened this issue Apr 17, 2023 · 2 comments

Comments

@lcnr
Copy link
Contributor

lcnr commented Apr 17, 2023

The old solver prioritizes non-global param-env candidates over other candidates.

This is different in the new solver which only prioritizes param-env candidates if they do not guide type inference. This is may break code due to inference changes.

We also disable this behavior during coherence as that would be incomplete. Need some examples where this break stable code.

@lcnr lcnr changed the title changed have we arbitrarily choose candidates for trait goals changed how we arbitrarily choose candidates for trait goals Apr 17, 2023
@compiler-errors
Copy link
Member

compiler-errors commented May 23, 2023

Noting here that we actually prefer alias and param-env bounds now, and we prefer them even if they guide inference, per rust-lang/rust#111473.

@lcnr
Copy link
Contributor Author

lcnr commented May 26, 2023

moved into #18

@lcnr lcnr closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants