-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Feature gate &Void
's uninhabitedness.
#39151
Feature gate &Void
's uninhabitedness.
#39151
Conversation
References to empty types are only considered empty if feature(never_type) is enabled.
Ping @nikomatsakis @arielb1 |
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit 2c6bc18 has been approved by |
The non-reference parts seem to be mostly uncontroversial, except for the issue that you can't have a match expression in a macro without risking unreachable code warnings. Not sure what is the best way to handle that. Macro reachability hygiene? |
This will continue to work, right? match void_ref_result {
Err(e) => ... ,
Ok(&r) => match r { },
} |
allow unreachable annotation on arm? |
If it worked before the matchck changes, it should continue working.
The problem is that the change is an hygiene hazard - every |
@bors r+ p=1 beta fix |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 2c6bc18 has been approved by |
@bors p=1 |
@arielb1 yeah, the current "unhygenic" approach is somewhat analogous to doing a post-monomorphization warning with generic functions. I feel like maybe you don't always want that to be ignored, but then a use-site "no---really----please warn/error" would suffice. |
This patch does not apply to beta - the inhabitedness mod does not exist. Is this really a beta backport? |
@canndrew I just wanted to say thanks for turning this around so quickly. |
…eferences, r=brson Feature gate `&Void`'s uninhabitedness. Here's a totally crazy PR which should never be merged.
No. it's a 1.16 issue only. |
Here's a totally crazy PR which should never be merged.