interpret: rename Pointer::from_addr → from_addr_invalid
This commit is contained in:
@@ -517,7 +517,7 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
|
||||
// Allow these casts, but make the pointer not dereferenceable.
|
||||
// (I.e., they behave like transmutation.)
|
||||
// This is correct because no pointers can ever be exposed in compile-time evaluation.
|
||||
Ok(Pointer::from_addr(addr))
|
||||
Ok(Pointer::from_addr_invalid(addr))
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
||||
@@ -178,7 +178,7 @@ impl<'tcx, Prov: Provenance> MPlaceTy<'tcx, Prov> {
|
||||
pub fn fake_alloc_zst(layout: TyAndLayout<'tcx>) -> Self {
|
||||
assert!(layout.is_zst());
|
||||
let align = layout.align.abi;
|
||||
let ptr = Pointer::from_addr(align.bytes()); // no provenance, absolute address
|
||||
let ptr = Pointer::from_addr_invalid(align.bytes()); // no provenance, absolute address
|
||||
MPlaceTy { mplace: MemPlace { ptr, meta: MemPlaceMeta::None }, layout, align }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user