summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/const_raw_ptr_ops.rs
blob: cd7c980077533bea1f5d4366ad82dba067bafb25 (plain)
1
2
3
4
5
6
fn main() {}

// unconst and bad, will thus error in miri
const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR can't compare
// unconst and bad, will thus error in miri
const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; //~ ERROR can't compare