File: fix-bootstrapping-on-x32.patch

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 934,168 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (42 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <git@fabian.gruenbichler.email>
Date: Tue, 22 Jul 2025 10:03:06 +0200
Subject: fix bootstrapping on x32
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Forwarded: https://github.com/rust-lang/rust/pull/144260

Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
---
 src/tools/rust-analyzer/crates/hir-def/src/expr_store/path.rs | 2 +-
 src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/rust-analyzer/crates/hir-def/src/expr_store/path.rs b/src/tools/rust-analyzer/crates/hir-def/src/expr_store/path.rs
index db83e73..253e3a9 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/expr_store/path.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/expr_store/path.rs
@@ -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>() == 16);
     assert!(size_of::<Option<Path>>() == 16);
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs b/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
index eb3b92d..396a50a 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
@@ -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>() == 16);
 
 pub type TypeRefId = Idx<TypeRef>;