Skip to content

Commit 0d4f56d

Browse files
authored
Merge pull request #20272 from glaubitz/x32-fixes
hir-def: Don't apply x86_64-specific asserts on x32
2 parents 4c7a8cb + 25122d9 commit 0d4f56d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/hir-def/src/expr_store/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub enum Path {
2727
}
2828

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

crates/hir-def/src/hir/type_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub enum TypeRef {
148148
Error,
149149
}
150150

151-
#[cfg(target_arch = "x86_64")]
151+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
152152
const _: () = assert!(size_of::<TypeRef>() == 24);
153153

154154
pub type TypeRefId = Idx<TypeRef>;

0 commit comments

Comments
 (0)