Rust 1.97.0 has a miscompilation bug

520 points noop_noob 93 comments

I think this miscompilation will affect a lot of code. So, maybe hold off a bit on deploying a rust version upgrade to production?

The conditions for a miscompilation seem to be:
* You put a 2-variant enum into an Option or an Option-like enum.
* You do a match on this Option.
* You're unlucky.