Add a validity testcase for uninhabited variants#4805
Add a validity testcase for uninhabited variants#4805RalfJung merged 1 commit intorust-lang:masterfrom
Conversation
|
Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two. |
7a2c7c7 to
df5113a
Compare
Yeah, we probably mostly test this via const-eval tests... but can't hurt to also have a Miri test for this. |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
|
So, having looked into this more closely, there's already a quite comprehensive rustc test for this at |
|
Having at least a sort of smoke test also in Miri does make sense I think. |
df5113a to
d6f2193
Compare
|
Okay, I've switched it over to a transmute and added a comment to note where the more comprehensive tests can be found. @rustbot ready |
|
Thanks! |
Found this testcase in a random unmerged branch of mine. Looks like I wrote it as part of my work on rust-lang/rust#138961, and then forgot to submit it when plans wrt the scope of that PR have changed.
I have double checked by grepping for the error message and it looks like we still don't have any similar tests in miri.