Skip to content

Associated type regression? unable to infer enough type information about _ #28871

Closed
@arcnmx

Description

@arcnmx

rustc seems to accept this under stable, but not beta or nightly.

playpen repro

trait T {
    type T;
}

struct S;
impl T for S {
    type T = S;
}

trait T2 {
    type T: Iterator<Item=<S as T>::T>;
}
error: unable to infer enough type information about `_`; type annotations or generic parameter binding required

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions