Skip to content

Commit 0bd5a21

Browse files
committed
give Pointer::into_parts a more scary name and offer a safer alternative
1 parent a28aa95 commit 0bd5a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub(crate) fn codegen_const_value<'tcx>(
133133
}
134134
}
135135
Scalar::Ptr(ptr, _size) => {
136-
let (prov, offset) = ptr.into_parts(); // we know the `offset` is relative
136+
let (prov, offset) = ptr.prov_and_relative_offset();
137137
let alloc_id = prov.alloc_id();
138138
let base_addr = match fx.tcx.global_alloc(alloc_id) {
139139
GlobalAlloc::Memory(alloc) => {

0 commit comments

Comments
 (0)