minirust icon indicating copy to clipboard operation
minirust copied to clipboard

Ensure that pattern matching is indeed exhaustive

Open RalfJung opened this issue 2 years ago • 0 comments

See this Zulip thread for a bunch of discussion. The short summary is that currently one can write non-UB code which enters a x & Some(_) arm where in that match arm x.is_some() returns false. We might want to ensure "match consistency" and make this UB, but that is not a trivial task, and it will almost certainly involve the aliasing model (so we'll need to have the basics of that in MiniRust before we can explore the pattern match question).

RalfJung avatar Aug 11 '22 11:08 RalfJung