Skip to content

Commit b506146

Browse files
committed
Sync from rust 71e4c005caa812a16fcb08d0bf1e6f1eda7c8381
2 parents b87f756 + d8c129a commit b506146

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
@@ -134,7 +134,7 @@ pub(crate) fn codegen_const_value<'tcx>(
134134
}
135135
}
136136
Scalar::Ptr(ptr, _size) => {
137-
let (prov, offset) = ptr.into_parts(); // we know the `offset` is relative
137+
let (prov, offset) = ptr.prov_and_relative_offset();
138138
let alloc_id = prov.alloc_id();
139139
let base_addr = match fx.tcx.global_alloc(alloc_id) {
140140
GlobalAlloc::Memory(alloc) => {

0 commit comments

Comments
 (0)