This commit is contained in:
Oli Scherer 2022-09-10 13:56:05 +00:00
parent ef3f649e49
commit e91db9f03c
3 changed files with 8 additions and 11 deletions

View file

@ -135,8 +135,8 @@ fn main() {
// CTFE-specific equality tests, need to also work at runtime.
let addr = &13 as *const i32;
let addr2 = (addr as usize).wrapping_add(usize::MAX).wrapping_add(1);
assert!(addr.guaranteed_eq(addr2 as *const _));
assert!(addr.guaranteed_ne(0x100 as *const _));
assert_eq!(addr.guaranteed_eq(addr2 as *const _), Some(true));
assert_eq!(addr.guaranteed_ne(0x100 as *const _), Some(true));
wide_ptr_ops();
metadata_vtable();