-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
B-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.F-non_exhaustive`#![feature(non_exhaustive)]``#![feature(non_exhaustive)]`T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
This is a tracking issue for the RFC "Future-proofing enums/structs with #[non_exhaustive] attribute" (rust-lang/rfcs#2008).
Steps:
- Implement the RFC (mentoring instructions below) -- done in PR RFC 2008: Future-proofing enums/structs with #[non_exhaustive] attribute #45394
- Adjust documentation (see instructions on forge)
- Stabilization PR (see instructions on forge)
Issues to be resolved prior to stabilization
-
#[non_exhaustive]
is not yet implemented for enum variants. - Current behavior on unions. The current implementation (Tracking issue for RFC 2008: Future-proofing enums/structs with #[non_exhaustive] attribute #44109) sometimes ignores non_exhaustive on unions, sometimes reports an error.
- In addition, the attribute is not currently validated (neither syntactic form nor location), so it can be written in weird forms (
#[non_exhaustive(foo)]
) and in arbitrary locations, including suspicious ones like traits(#[non_exhaustive] trait Trait {}
). - Fix [nightly regression] E0639 + adding #[non_exhaustive] to io::ErrorKind is a breaking change #53549
stepancheg and rossmacarthurkillercup, CAD97, ah-, runiq, rossmacarthur and 18 more
Metadata
Metadata
Assignees
Labels
B-RFC-implementedBlocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Approved by a merged RFC and implemented but not stabilized.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.F-non_exhaustive`#![feature(non_exhaustive)]``#![feature(non_exhaustive)]`T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.