diff options
| author | Ralf Jung <post@ralfj.de> | 2025-06-28 15:20:33 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-06-29 00:16:19 +0200 |
| commit | 58dce8ca86e2825ab2610fd9d70050f78a8d16d5 (patch) | |
| tree | 9141621a94b77774670a7bbeffbf22fb89e28a17 /compiler/rustc_codegen_gcc/src/common.rs | |
| parent | d41e12f1f4e4884c356f319b881921aa37040de5 (diff) | |
| download | rust-58dce8ca86e2825ab2610fd9d70050f78a8d16d5.tar.gz rust-58dce8ca86e2825ab2610fd9d70050f78a8d16d5.zip | |
give Pointer::into_parts a more scary name and offer a safer alternative
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 2 |
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 58ff2f1f8f0..cc077059dba 100644 --- a/compiler/rustc_codegen_gcc/src/common.rs +++ b/compiler/rustc_codegen_gcc/src/common.rs @@ -261,7 +261,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) => { |
