Skip to content

Type-checker cannot infer type if it passes through some traits with associated types #44976

@illicitonion

Description

@illicitonion

See repro at https://github.com/illicitonion/repro-rustfuturetypeinference

For a trait type with two type parameters, if one arm of a match leaves one of the type parameters unbound, I need to explicitly cast its value to bind the type parameter to match that of the other arms.

I expect that the type-checker should be able to properly infer this type (at least for simple cases).

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