diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-06-30 20:49:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-30 20:49:41 +0200 |
| commit | 7d904aeb906e946fb4df981f57bdba771cccc304 (patch) | |
| tree | bdc2d15edca7e46799c9b4a30a3c054ea4a809dd | |
| parent | f1d6f48e9133f73277e096ed667820e584d021eb (diff) | |
| parent | 6e635990da9ceabfbd67d1d129e45879be97813d (diff) | |
| download | rust-7d904aeb906e946fb4df981f57bdba771cccc304.tar.gz rust-7d904aeb906e946fb4df981f57bdba771cccc304.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`
| -rw-r--r-- | src/common.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.rs b/src/common.rs index fdd47821b51..89f77f91699 100644 --- a/src/common.rs +++ b/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) => { |
