mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00

Don't emit two `assume`s in transmutes when one is a subset of the other For example, transmuting between `bool` and `Ordering` doesn't need two `assume`s because one range is a superset of the other. Multiple are still used for things like `char` <-> `NonZero<u32>`, which overlap but where neither fully contains the other.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.