about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-06-28 15:20:33 +0200
committerRalf Jung <post@ralfj.de>2025-06-29 00:16:19 +0200
commit6e635990da9ceabfbd67d1d129e45879be97813d (patch)
tree3f575d241edb67a854d08e6540e4334b8a86d46e
parent7014ca42859c8f7d1356c6404390337304f132b8 (diff)
give Pointer::into_parts a more scary name and offer a safer alternative
-rw-r--r--src/common.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.rs b/src/common.rs
index 58ff2f1f8f0..cc077059dba 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -261,7 +261,7 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
                 }
             }
             Scalar::Ptr(ptr, _size) => {
-                let (prov, offset) = ptr.into_parts(); // we know the `offset` is relative
+                let (prov, offset) = ptr.prov_and_relative_offset();
                 let alloc_id = prov.alloc_id();
                 let base_addr = match self.tcx.global_alloc(alloc_id) {
                     GlobalAlloc::Memory(alloc) => {