-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC 2008 non-exhaustive enums/structs: Finishing Touches #49345
Conversation
Since I worked on the initial implementation of RFC 2008, I wanted to do the finishing touches on it. There were two issues raised in the #44109 - checking the attribute location and syntax was correct and how it interacted with unions. I've fixed the location and syntax issue. I was unsure regarding unions - I've not used those personally - so after some reading I figured that since it seems like you can only ever match on a single field in a union, having |
Prohibiting it on unions sounds good to me. It can always be allowed later if something persuasive comes up. (Consider a union case in |
@scottmcm I've added a union case in |
☔ The latest upstream changes (presumably #49291) made this pull request unmergeable. Please resolve the merge conflicts. |
@davidtwco needs rebase |
@bors r+ |
📌 Commit 138472b has been approved by |
RFC 2008: Finishing Touches Part of rust-lang#44109. r? @nikomatsakis (not sure who was best for this PR).
RFC 2008: Finishing Touches Part of rust-lang#44109. r? @nikomatsakis (not sure who was best for this PR).
Rollup of 9 pull requests Successful merges: - #48658 (Add a generic CAS loop to std::sync::Atomic*) - #49253 (Take the original extra-filename passed to a crate into account when resolving it as a dependency) - #49345 (RFC 2008: Finishing Touches) - #49432 (Flush executables to disk after linkage) - #49496 (Add more vec![... ; n] optimizations) - #49563 (add a dist builder to build rust-std components for the THUMB targets) - #49654 (Host compiler documentation: Include private items) - #49667 (Add more features to rust_2018_preview) - #49674 (ci: Remove x86_64-gnu-incremental builder) Failed merges:
Part of #44109.
r? @nikomatsakis
(not sure who was best for this PR).