-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Unions with ZSTs are no longer usable #59126
Labels
A-const-eval
Area: constant evaluation (mir interpretation)
C-bug
Category: This is a bug.
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Interesting. Looks like a validation issue? Cc @oli-obk |
oli-obk
added
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
C-bug
Category: This is a bug.
A-const-eval
Area: constant evaluation (mir interpretation)
labels
Mar 12, 2019
pnkfelix
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
P-high
High priority
labels
Mar 12, 2019
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Mar 13, 2019
…RalfJung Unregress using scalar unions in constants. fixes rust-lang#59126 r? @RalfJung I also made a bunch of these invariants panic instead of report an error.
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 15, 2019
…RalfJung Unregress using scalar unions in constants. fixes rust-lang#59126 r? @RalfJung I also made a bunch of these invariants panic instead of report an error.
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 16, 2019
…RalfJung Unregress using scalar unions in constants. fixes rust-lang#59126 r? @RalfJung I also made a bunch of these invariants panic instead of report an error.
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-eval
Area: constant evaluation (mir interpretation)
C-bug
Category: This is a bug.
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
It looks like this was broken in the release of 1.32.0 (and is still broken, even on nightly) (checked on https://rust.godbolt.org/). The following example program:
Fails to compile:
Interestingly, making the
union
#[repr(C)]
fixes it.My Rust version:
I know
union
field accesses aren't stable, but I don't think this qualifies as a field access. And yes, I'm aware ofMaybeUninit
.cc @RalfJung
The text was updated successfully, but these errors were encountered: