Skip to content

Bad trait solving performance with bounds on associated types #6432

Open
@flodiebold

Description

@flodiebold

A bound like T::Item: Debug can slow down trait solving a lot because it will currently result in a search through all Debug impls (this case will be hit), see e.g. #6362.
rust-lang/chalk#589 should solve this, but the changes in rust-lang/chalk#638 should probably also fix it in most cases. At some point, I'd like to remove the above-mentioned unrestricted search case (i.e. return an empty list instead), which would make sure we don't get bad performance at the cost of getting wrong results if we encounter that situation (which we shouldn't).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-perfperformance issuesA-tytype system / type inference / traits / method resolutionS-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions