about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering
diff options
context:
space:
mode:
authorEdoardo Marangoni <edoardo.marangoni@scisemi.com>2025-06-29 12:11:51 +0200
committerEdoardo Marangoni <ecmm@anche.no>2025-07-07 09:04:53 +0200
commit93f1201c0616672d71e640a0ad600d029448c40a (patch)
tree0b66541f5856f978ce18ce1643da965898cdd8d3 /compiler/rustc_ast_lowering
parent733b47ea4b1b86216f14ef56e49440c33933f230 (diff)
downloadrust-93f1201c0616672d71e640a0ad600d029448c40a.tar.gz
rust-93f1201c0616672d71e640a0ad600d029448c40a.zip
compiler: Parse `p-` specs in datalayout string, allow definition of custom default data address space
Diffstat (limited to 'compiler/rustc_ast_lowering')
-rw-r--r--compiler/rustc_ast_lowering/src/format.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/format.rs b/compiler/rustc_ast_lowering/src/format.rs
index 943cde90dd2..5b1dcab87b9 100644
--- a/compiler/rustc_ast_lowering/src/format.rs
+++ b/compiler/rustc_ast_lowering/src/format.rs
@@ -55,7 +55,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
     /// Get the maximum value of int_ty. It is platform-dependent due to the byte size of isize
     fn int_ty_max(&self, int_ty: IntTy) -> u128 {
         match int_ty {
-            IntTy::Isize => self.tcx.data_layout.pointer_size.signed_int_max() as u128,
+            IntTy::Isize => self.tcx.data_layout.pointer_size().signed_int_max() as u128,
             IntTy::I8 => i8::MAX as u128,
             IntTy::I16 => i16::MAX as u128,
             IntTy::I32 => i32::MAX as u128,
@@ -67,7 +67,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
     /// Get the maximum value of uint_ty. It is platform-dependent due to the byte size of usize
     fn uint_ty_max(&self, uint_ty: UintTy) -> u128 {
         match uint_ty {
-            UintTy::Usize => self.tcx.data_layout.pointer_size.unsigned_int_max(),
+            UintTy::Usize => self.tcx.data_layout.pointer_size().unsigned_int_max(),
             UintTy::U8 => u8::MAX as u128,
             UintTy::U16 => u16::MAX as u128,
             UintTy::U32 => u32::MAX as u128,