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

Projects
None yet
5 participants
@davidtwco
Copy link
Member

davidtwco commented Mar 24, 2018

Part of #44109.

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

@davidtwco

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

scottmcm commented Mar 24, 2018

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 davidtwco force-pushed the davidtwco:issue-44109 branch from 13ec4b6 to 0eeb652 Mar 25, 2018

@davidtwco

This comment has been minimized.

Copy link
Member Author

davidtwco commented Mar 25, 2018

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

@bors

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Apr 2, 2018

@davidtwco needs rebase

@davidtwco davidtwco force-pushed the davidtwco:issue-44109 branch from 0eeb652 to 138472b Apr 2, 2018

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Apr 4, 2018

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Apr 4, 2018

📌 Commit 138472b has been approved by nikomatsakis

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 5, 2018

Rollup merge of rust-lang#49345 - davidtwco:issue-44109, r=nikomatsakis
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

Auto merge of #49675 - alexcrichton:rollup, r=alexcrichton
Rollup of 11 pull requests

Successful merges:

 - #48709 (remove erroneous error message when checking impl trait params)
 - #48851 (Stabilize attributes on generic parameters)
 - #49154 (AST: Give spans to all identifiers)
 - #49253 (Take the original extra-filename passed to a crate into account when resolving it as a dependency)
 - #49345 (RFC 2008: Finishing Touches)
 - #49392 (fixes move analysis)
 - #49419 (Small typeck refactorings)
 - #49432 (Flush executables to disk after linkage)
 - #49488 (std: Minimize size of panicking on wasm)
 - #49496 (Add more vec![... ; n] optimizations)
 - #49563 (add a dist builder to build rust-std components for the THUMB targets)

Failed merges:

 - #49350 (Expand macros in `extern {}` blocks)

bors added a commit that referenced this pull request Apr 5, 2018

Auto merge of #49675 - alexcrichton:rollup, r=alexcrichton
Rollup of 11 pull requests

Successful merges:

 - #48709 (remove erroneous error message when checking impl trait params)
 - #48851 (Stabilize attributes on generic parameters)
 - #49154 (AST: Give spans to all identifiers)
 - #49253 (Take the original extra-filename passed to a crate into account when resolving it as a dependency)
 - #49345 (RFC 2008: Finishing Touches)
 - #49392 (fixes move analysis)
 - #49419 (Small typeck refactorings)
 - #49432 (Flush executables to disk after linkage)
 - #49488 (std: Minimize size of panicking on wasm)
 - #49496 (Add more vec![... ; n] optimizations)
 - #49563 (add a dist builder to build rust-std components for the THUMB targets)

Failed merges:

 - #49350 (Expand macros in `extern {}` blocks)

@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

Rollup merge of rust-lang#49345 - davidtwco:issue-44109, r=nikomatsakis
RFC 2008: Finishing Touches

Part of rust-lang#44109.

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

@kennytm kennytm referenced this pull request Apr 5, 2018

Merged

Rollup of 9 pull requests #49684

bors added a commit that referenced this pull request Apr 5, 2018

Auto merge of #49684 - kennytm:rollup, r=kennytm
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)
 - #49503 (Inject the `compiler_builtins` crate whenever the `core` crate is injected)
 - #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)

Failed merges:

bors added a commit that referenced this pull request Apr 5, 2018

Auto merge of #49684 - kennytm:rollup, r=kennytm
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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@davidtwco davidtwco deleted the davidtwco:issue-44109 branch Apr 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.