Matching on an enum should read the entire enum #56797
Labels
A-borrow-checker
Area: The borrow checker
A-NLL
Area: Non-lexical lifetimes (NLL)
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
NLL-fixed-by-NLL
Bugs fixed, but only when NLL is enabled.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Enum layout optimizations mean that the discriminant of an enum may not be stored in a tag disjoint from the rest of the fields of the enum. Run this example with MIRI to see this is a problem. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4ea0e31adbb3fe1893be528277060248
This is fixed by #56790, but this issue is being raised for tracking any backports.
cc @nikomatsakis
The text was updated successfully, but these errors were encountered: