rust/compiler/rustc_const_eval/src/const_eval
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
..
dummy_machine.rs simplfy memory kind handling during interning 2025-07-16 15:29:52 +02:00
error.rs Show the memory of uninit reads 2025-07-18 07:47:08 +00:00
eval_queries.rs const-eval: full support for pointer fragments 2025-07-30 08:13:58 +02:00
fn_queries.rs Methods of const traits are const 2025-01-15 15:57:06 +00:00
machine.rs Rollup merge of #144885 - zachs18:ptr_guaranteed_cmp_more, r=RalfJung 2025-08-26 14:19:16 +10:00
mod.rs Remove useless lifetime parameter. 2025-07-23 23:54:37 +00:00
valtrees.rs Remove useless lifetime parameter. 2025-07-23 23:54:37 +00:00