Skip to content

Conflicting impls if type parameter is bounded by associated types #41680

@Kixunil

Description

@Kixunil

When implementing trait for generic type the compiler fails with "conflicting impls" message if the bounds for the type parameter differ in associated type.

Minimalistic example

I expected this to pass because if the associated types differ, then types implementing such trait must differ too.

The compiler message:

rustc 1.17.0 (56124baa9 2017-04-24)
error[E0119]: conflicting implementations of trait `Foo` for type `Bar<_>`:

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