Skip to content

[nightly regression] E0639 + adding #[non_exhaustive] to io::ErrorKind is a breaking change #53549

Closed
@durka

Description

@durka

In stable and beta, you can write ErrorKind::Other {}, but in nightly this triggers E0639: cannot create non-exhaustive variant using struct expression. (As an aside, that error message should be rephrased and examples added to --explain.)

This is either a bug with #[non_exhaustive], or it means that the attribute can't be applied to public enums without creating a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions