Skip to content

Traits with associated types break in struct bounds #19632

Closed
@sfackler

Description

@sfackler
#![feature(associated_types)]

trait PoolManager {
    type C;
}

struct InnerPool<M: PoolManager> {
    manager: M,
}

fn main() {}
test.rs:7:21: 7:32 error: no suitable bound on `<generic #0>`
test.rs:7 struct InnerPool<M: PoolManager> {
                              ^~~~~~~~~~~
error: aborting due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions