Skip to content

selection in the new solver #41

Open
@lcnr

Description

@lcnr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions