Skip to content

Deriving Debug on an enum with uninhabited type triggers warning #38885

Open
@seanmonstar

Description

// no warning
#[derive(Debug)]
enum Void {}

// warns about unreachable pattern
#[derive(Debug)]
enum Foo {
    Bar(u8),
    Void(Void),
}

Caused by #38069

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.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