hir-def: Don't apply x86_64-specific asserts on x32

This fixes the rustc build on x32 for which struct sizes differ.
This commit is contained in:
John Paul Adrian Glaubitz 2025-07-21 17:03:07 +02:00
parent 4c7a8cbe8d
commit 25122d9289
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ pub enum Path {
}
// This type is being used a lot, make sure it doesn't grow unintentionally.
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
const _: () = {
assert!(size_of::<Path>() == 24);
assert!(size_of::<Option<Path>>() == 24);

View file

@ -148,7 +148,7 @@ pub enum TypeRef {
Error,
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
const _: () = assert!(size_of::<TypeRef>() == 24);
pub type TypeRefId = Idx<TypeRef>;