Skip to content

Empty bounds lists in where clauses cause the type to not be WF-checked. #53696

Closed
@eddyb

Description

@eddyb

This produces no error:

fn foo() where Vec<dyn Copy>: {}

Just like the other known "missing WF checks" bug (#21903):

type Foo = Vec<dyn Copy>;

Unlike type aliases, I don't believe you can even reach the type written in the where clause without any bounds, since it doesn't even "remain in the type/trait-system" (e.g. inference can't pick it up).

So it's not as bad, but I did come up with use for it as a WF requirement, in #44580 (comment).

cc @rust-lang/lang @RalfJung @petrochenkov

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemT-langRelevant to the language team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions