Remove unneeded asserts

This commit is contained in:
carbotaniuman 2022-05-19 13:51:53 -05:00
parent 10d9ecda48
commit e24673502f
2 changed files with 1 additions and 8 deletions

View file

@ -225,9 +225,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
let addr = u64::try_from(size.truncate(v)).unwrap();
let ptr = M::ptr_from_addr_cast(&self, addr);
if addr == 0 {
assert!(ptr.provenance.is_none(), "null pointer can never have an AllocId");
}
Scalar::from_maybe_pointer(ptr, self)
}