Skip to content

Commit 6e63599

Browse files
committed
give Pointer::into_parts a more scary name and offer a safer alternative
1 parent 7014ca4 commit 6e63599

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
261261
}
262262
}
263263
Scalar::Ptr(ptr, _size) => {
264-
let (prov, offset) = ptr.into_parts(); // we know the `offset` is relative
264+
let (prov, offset) = ptr.prov_and_relative_offset();
265265
let alloc_id = prov.alloc_id();
266266
let base_addr = match self.tcx.global_alloc(alloc_id) {
267267
GlobalAlloc::Memory(alloc) => {

0 commit comments

Comments
 (0)