Skip to content

E0122 "trait bounds are not (yet) enforced in type definitions" not triggered by where clauses #39122

Closed
@cjsut

Description

@cjsut

As this playpen shows, diagnostic E0122 does not catch trait bounds introduced via where clauses.

Specifically,

type X<T: std::ops::Add> = T;

triggers a warning, but

type Y<T> where T: std::ops::Add = T;

does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemE-help-wantedCall for participation: Help is requested to fix this issue.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