about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-30 20:49:41 +0200
committerGitHub <noreply@github.com>2025-06-30 20:49:41 +0200
commit8292936d744dc798d47e433fc0478f1e86e3e252 (patch)
tree73d8a030640b5516e20f684e098a91deb939179f /compiler/rustc_codegen_llvm/src
parent8b8cd35edc64232ceff8e8e2e770618e0261127c (diff)
parent75c6e1493102e9dcbf997d4766d99c7b2b6bc7c2 (diff)
downloadrust-8292936d744dc798d47e433fc0478f1e86e3e252.tar.gz
rust-8292936d744dc798d47e433fc0478f1e86e3e252.zip
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/common.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs
index ae5add59322..7cfab25bc50 100644
--- a/compiler/rustc_codegen_llvm/src/common.rs
+++ b/compiler/rustc_codegen_llvm/src/common.rs
@@ -268,7 +268,7 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> {
                 }
             }
             Scalar::Ptr(ptr, _size) => {
-                let (prov, offset) = ptr.into_parts();
+                let (prov, offset) = ptr.prov_and_relative_offset();
                 let global_alloc = self.tcx.global_alloc(prov.alloc_id());
                 let base_addr = match global_alloc {
                     GlobalAlloc::Memory(alloc) => {