Skip to content
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

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

davidtwco
Copy link
Member

Part of #44109.

r? @nikomatsakis
(not sure who was best for this PR).

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2018
@davidtwco
Copy link
Member Author

davidtwco commented Mar 24, 2018

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 #[non_exhausive] apply doesn't make much sense - if this isn't what we want then I'll change that.

@scottmcm
Copy link
Member

Prohibiting it on unions sounds good to me. It can always be allowed later if something persuasive comes up. (Consider a union case in invalid-attribute.rs.)

@davidtwco
Copy link
Member Author

@scottmcm I've added a union case in invalid-attribute.rs. Also (hopefully) fixed the Travis failure.

@bors
Copy link
Contributor

bors commented Mar 29, 2018

☔ The latest upstream changes (presumably #49291) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

@davidtwco needs rebase

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 4, 2018

📌 Commit 138472b has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 4, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 5, 2018
RFC 2008: Finishing Touches

Part of rust-lang#44109.

r? @nikomatsakis
(not sure who was best for this PR).
@dtolnay dtolnay changed the title RFC 2008: Finishing Touches RFC 2008 non-exhaustive enums/structs: Finishing Touches Apr 5, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Apr 5, 2018
RFC 2008: Finishing Touches

Part of rust-lang#44109.

r? @nikomatsakis
(not sure who was best for this PR).
bors added a commit that referenced this pull request Apr 5, 2018
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:
@bors bors merged commit 138472b into rust-lang:master Apr 5, 2018
@davidtwco davidtwco deleted the issue-44109 branch April 5, 2018 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants