1
Fork 0
rust/compiler/rustc_mir_transform
bors a964a92277 Auto merge of #131068 - RalfJung:immediate-offset-sanity-check, r=nnethercote
Don't use Immediate::offset to transmute pointers to integers

This applies the relatively new `assert_matches_abi` check in the `offset` operation on immediates, which makes sure that if offsets are used to alter the layout (which is possible because the field layout is arbitrarily picked by the caller), this is not done in a way that breaks the invariant of the `Immediate` type.

This leads to ICEs in a GVN mir-opt test, so the second commit fixes GVN.

Fixes https://github.com/rust-lang/rust/issues/131064.
2024-10-07 00:45:41 +00:00
..
src Auto merge of #131068 - RalfJung:immediate-offset-sanity-check, r=nnethercote 2024-10-07 00:45:41 +00:00
Cargo.toml Simplify match based on the cast result of IntToInt. 2024-08-03 10:55:43 +08:00
messages.ftl Add a Lint for Pointer to Integer Transmutes in Consts 2024-10-05 12:48:02 +00:00