Skip to content

Avoid inference guessing in trait solver (e.g., favoring where-clauses over impls) #120

Open
@nikomatsakis

Description

@nikomatsakis

The current trait solver performs "inference guessing" in various places, leading to incompleteness (failure to find solutions that exist). We avoid unsoundness by eliminating incompletness in coherence. But it may be possible to refactor the trait solver to instead return "guidance"; it would be up to HIR type check or other phases to decide if/when to apply this guidance. This would lead to more programs being compiled but also a cleaner overall setup. Experimentation is required to see if this truly works.

cc rust-lang/rust#41756

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions