Skip to content

Rust fails to infer types for this function #52845

@anirudhb

Description

@anirudhb

Playground

Playground that works

As far I know, this should be a bug. There is only one impl of From<A> that satisfies the type constraints defined in the function, which is impl From<A> for AMain. Same thing with From<B> and impl From<B> for BMain.

edit: GitHub automatially opens the url with an extra slash, please remove it for the playground to load properly

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inferenceArea: Type inferenceC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions