rust/compiler/rustc_const_eval/src
Stuart Cook e011dd47ee
Rollup merge of #144885 - zachs18:ptr_guaranteed_cmp_more, r=RalfJung
Implement some more checks in `ptr_guaranteed_cmp`.

* Pointers with different residues modulo their allocations' least common alignment are never equal.
* Pointers to the same static allocation are equal if and only if they have the same offset.
* Pointers to different non-zero-sized static allocations are unequal if both point within their allocation, and not on opposite ends.

Tracking issue for `const_raw_ptr_comparison`: <https://github.com/rust-lang/rust/issues/53020>

This should not affect `is_null`, the only usage of this intrinsic on stable.

Closes https://github.com/rust-lang/rust/issues/144584
2025-08-26 14:19:16 +10:00
..
check_consts Revert "Partially outline code inside the panic! macro". 2025-08-12 12:52:39 +02:00
const_eval Rollup merge of #144885 - zachs18:ptr_guaranteed_cmp_more, r=RalfJung 2025-08-26 14:19:16 +10:00
interpret miri: also detect aliasing of in-place argument and return place 2025-08-22 10:21:33 +02:00
util Rollup merge of #145700 - nnethercote:fix-145696, r=lcnr 2025-08-21 17:57:56 -04:00
errors.rs Auto merge of #144081 - RalfJung:const-ptr-fragments, r=oli-obk 2025-08-17 04:33:31 +00:00
lib.rs Rollup merge of #144682 - nxsaken:strict_overflow_ops, r=Mark-Simulacrum 2025-08-07 20:49:47 +10:00