adjust dangling-int-ptr error message
This commit is contained in:
parent
4045ce641a
commit
46956f76ca
18 changed files with 60 additions and 47 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue