1
Fork 0

adjust dangling-int-ptr error message

This commit is contained in:
Ralf Jung 2022-07-03 15:46:22 -04:00
parent 4045ce641a
commit 46956f76ca
18 changed files with 60 additions and 47 deletions

View file

@ -513,7 +513,7 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
_ecx: &InterpCx<$mir, $tcx, Self>,
addr: u64,
) -> Pointer<Option<AllocId>> {
Pointer::new(None, Size::from_bytes(addr))
Pointer::from_addr(addr)
}
#[inline(always)]
@ -523,7 +523,7 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
) -> InterpResult<$tcx, Pointer<Option<AllocId>>> {
// Allow these casts, but make the pointer not dereferenceable.
// (I.e., they behave like transmutation.)
Ok(Pointer::new(None, Size::from_bytes(addr)))
Ok(Pointer::from_addr(addr))
}
#[inline(always)]