ensure that statics are inhabited#78324
Merged
bors merged 3 commits intorust-lang:masterfrom Oct 26, 2020
Merged
Conversation
69762e3 to
1333206
Compare
oli-obk
reviewed
Oct 25, 2020
| extern { | ||
| static VOID: Void; //~ ERROR static of uninhabited type | ||
| //~| WARN: previously accepted | ||
| static NEVER: !; //~ ERROR static of uninhabited type |
Contributor
There was a problem hiding this comment.
does the diagnostic for a regular static NEVER: ! = panic!(); change with this PR?
Member
Author
There was a problem hiding this comment.
Yes, looks like it does (see the test change I just pushed)... would you prefer it to only apply to foreign items?
Contributor
There was a problem hiding this comment.
No, having tests for it is good, I'm mostly suprised we don't have any other tests for this
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 3bd5cc9 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Oct 25, 2020
…-obk ensure that statics are inhabited Fixes rust-lang#74840 r? @oli-obk
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Oct 25, 2020
…-obk ensure that statics are inhabited Fixes rust-lang#74840 r? @oli-obk
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
This was referenced Oct 26, 2020
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #74840
r? @oli-obk