rust/compiler/rustc_const_eval/src
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
..
check_consts Stabilize const_refs_to_static 2024-09-26 13:21:15 +02:00
const_eval make InterpResult a dedicated type to avoid accidentally discarding the error 2024-10-01 21:45:35 +02:00
interpret Auto merge of #131068 - RalfJung:immediate-offset-sanity-check, r=nnethercote 2024-10-07 00:45:41 +00:00
util make InterpResult a dedicated type to avoid accidentally discarding the error 2024-10-01 21:45:35 +02:00
errors.rs Check vtable projections for validity in miri 2024-09-23 19:38:26 -04:00
lib.rs fix unqualified_local_imports in rustc_const_eval 2024-09-23 11:57:32 +02:00