about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2025-07-08 15:10:51 +0000
committerGitHub <noreply@github.com>2025-07-08 15:10:51 +0000
commita310bdd0d87163341f9344eff80860cc8519f943 (patch)
tree05a5849ce18ed88207f14d23da57a06dfc1e8126 /compiler/rustc_codegen_llvm/src/common.rs
parent061a941adc570ed717dfa2f3508a9038b8300eca (diff)
parentbdead41b65ed10d6c947b20ddb724f1ae59e2b48 (diff)
downloadrust-a310bdd0d87163341f9344eff80860cc8519f943.tar.gz
rust-a310bdd0d87163341f9344eff80860cc8519f943.zip
Merge pull request #1853 from Kobzol/pull-fixed
Perform the first rustc pull.. for the second time
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/common.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs
index ae5add59322..92f38565eef 100644
--- a/compiler/rustc_codegen_llvm/src/common.rs
+++ b/compiler/rustc_codegen_llvm/src/common.rs
@@ -175,7 +175,7 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> {
     }
 
     fn const_usize(&self, i: u64) -> &'ll Value {
-        let bit_size = self.data_layout().pointer_size.bits();
+        let bit_size = self.data_layout().pointer_size().bits();
         if bit_size < 64 {
             // make sure it doesn't overflow
             assert!(i < (1 << bit_size));
@@ -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) => {