give Pointer::into_parts a more scary name and offer a safer alternative
This commit is contained in:
@@ -268,7 +268,7 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> {
|
||||
}
|
||||
}
|
||||
Scalar::Ptr(ptr, _size) => {
|
||||
let (prov, offset) = ptr.into_parts();
|
||||
let (prov, offset) = ptr.prov_and_relative_offset();
|
||||
let global_alloc = self.tcx.global_alloc(prov.alloc_id());
|
||||
let base_addr = match global_alloc {
|
||||
GlobalAlloc::Memory(alloc) => {
|
||||
|
||||
Reference in New Issue
Block a user