RFC 2008 non-exhaustive enums/structs: Finishing Touches#49345
RFC 2008 non-exhaustive enums/structs: Finishing Touches#49345bors merged 1 commit intorust-lang:masterfrom
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).