rust-lang / trait-system-refactor-initiative

The Rustc Trait System Refactor Initiative
21 stars 0 forks source link

changed how we arbitrarily choose candidates for trait goals #11

Closed lcnr closed 1 year ago

lcnr commented 1 year ago

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.

compiler-errors commented 1 year ago

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 commented 1 year ago

moved into #18