Skip to content

Commit 7d904ae

Browse files
authored
Rollup merge of #143140 - RalfJung:ptr-into-parts, r=oli-obk
give Pointer::into_parts a more scary name and offer a safer alternative `into_parts` is a bit too innocent of a name for a somewhat subtle operation. r? `@oli-obk`
2 parents f1d6f48 + 6e63599 commit 7d904ae

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
@@ -248,7 +248,7 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
248248
}
249249
}
250250
Scalar::Ptr(ptr, _size) => {
251-
let (prov, offset) = ptr.into_parts(); // we know the `offset` is relative
251+
let (prov, offset) = ptr.prov_and_relative_offset();
252252
let alloc_id = prov.alloc_id();
253253
let base_addr = match self.tcx.global_alloc(alloc_id) {
254254
GlobalAlloc::Memory(alloc) => {

0 commit comments

Comments
 (0)