about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
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_gcc
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_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/common.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs
index fdd47821b51..89f77f91699 100644
--- a/compiler/rustc_codegen_gcc/src/common.rs
+++ b/compiler/rustc_codegen_gcc/src/common.rs
@@ -248,7 +248,7 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
                 }
             }
             Scalar::Ptr(ptr, _size) => {
-                let (prov, offset) = ptr.into_parts(); // we know the `offset` is relative
+                let (prov, offset) = ptr.prov_and_relative_offset();
                 let alloc_id = prov.alloc_id();
                 let base_addr = match self.tcx.global_alloc(alloc_id) {
                     GlobalAlloc::Memory(alloc) => {