I tried this code:
#![feature(const_raw_ptr_comparison)]
static X: u64 = 1;
const B: Option<bool> = (&raw const X).guaranteed_eq(&raw const X);
fn main() {
println!("{B:?}");
}
I expected to the code to output Some(true), but it output None.
guaranteed_eq is documented to sometimes output None on equal pointers though, so I'm not sure if this is a bug.
@rustbot labels +A-const-eval
Tracking issue: #53020
Meta
Reproducible on the playground with version 1.90.0-nightly (2025-07-27 f8e355c230c6eb7b78ff)
I tried this code:
I expected to the code to output
Some(true), but it outputNone.guaranteed_eqis documented to sometimes outputNoneon equal pointers though, so I'm not sure if this is a bug.@rustbot labels +A-const-eval
Tracking issue: #53020
Meta
Reproducible on the playground with version
1.90.0-nightly (2025-07-27 f8e355c230c6eb7b78ff)