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

add dedicated error variant for writing the discriminant of an uninhabited enum variant #89859

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

RalfJung
Copy link
Member

This is conceptually different from hitting an Unreachable terminator. Also add some sanity check making sure we don't write discriminants of things that do not have discriminants.

r? @oli-obk

@rust-highfive
Copy link
Collaborator

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 13, 2021
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung changed the title add dedicated error variant for writing the discriminant of an uninhabited enum add dedicated error variant for writing the discriminant of an uninhabited enum variant Oct 14, 2021
@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 14, 2021
@oli-obk
Copy link
Contributor

oli-obk commented Oct 14, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 14, 2021

📌 Commit c5a68cf has been approved by oli-obk

@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 Oct 14, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 15, 2021
add dedicated error variant for writing the discriminant of an uninhabited enum variant

This is conceptually different from hitting an `Unreachable` terminator. Also add some sanity check making sure we don't write discriminants of things that do not have discriminants.

r? `@oli-obk`
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 15, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#86011 (move implicit `Sized` predicate to end of list)
 - rust-lang#89821 (Add a strange test for `unsafe_code` lint.)
 - rust-lang#89859 (add dedicated error variant for writing the discriminant of an uninhabited enum variant)
 - rust-lang#89870 (Suggest Box::pin when Pin::new is used instead)
 - rust-lang#89880 (Use non-checking TLS relocation in aarch64 asm! sym test.)
 - rust-lang#89885 (add long explanation for E0183)
 - rust-lang#89894 (Remove unused dependencies from rustc_const_eval)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 345d483 into rust-lang:master Oct 15, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 15, 2021
@RalfJung RalfJung deleted the write-discriminant branch October 16, 2021 19:25
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants