Skip to content

Traits with associated types break in where clauses on impl items #19631

Closed
@sfackler

Description

@sfackler
#![feature(associated_types)]

trait PoolManager {
    type C;
}

struct InnerPool<M> {
    manager: M,
}

impl<M> InnerPool<M> where M: PoolManager {}

fn main() {}
test.rs:11:31: 11:42 error: no suitable bound on `<generic #0>`
test.rs:11 impl<M> InnerPool<M> where M: PoolManager {}
                                         ^~~~~~~~~~~
error: aborting due to previous error

Moving the bounds to the old style allows it to compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions