adjusted and reenabled x32 patch
[packages/rust.git] / rust-x32.patch
1 --- rustc-1.47.0-src.orig/src/librustc_errors/lib.rs    2020-10-07 09:53:22.000000000 +0200
2 +++ rustc-1.47.0-src/src/librustc_errors/lib.rs 2020-10-30 13:52:39.921952637 +0100
3 @@ -45,7 +45,7 @@
4  
5  // `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
6  // (See also the comment on `DiagnosticBuilderInner`.)
7 -#[cfg(target_arch = "x86_64")]
8 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
9  rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
10  
11  /// Indicates the confidence in the correctness of a suggestion.
12 --- rustc-1.47.0-src.orig/src/librustc_ast/ast.rs       2020-10-07 09:53:22.000000000 +0200
13 +++ rustc-1.47.0-src/src/librustc_ast/ast.rs    2020-10-30 13:53:59.025035237 +0100
14 @@ -1056,7 +1056,7 @@
15  }
16  
17  // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
18 -#[cfg(target_arch = "x86_64")]
19 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
20  rustc_data_structures::static_assert_size!(Expr, 104);
21  
22  impl Expr {
23 --- rustc-1.47.0-src.orig/src/librustc_ast/token.rs     2020-10-07 09:53:22.000000000 +0200
24 +++ rustc-1.47.0-src/src/librustc_ast/token.rs  2020-10-30 13:52:39.925285960 +0100
25 @@ -710,7 +710,7 @@
26  }
27  
28  // `Nonterminal` is used a lot. Make sure it doesn't unintentionally get bigger.
29 -#[cfg(target_arch = "x86_64")]
30 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
31  rustc_data_structures::static_assert_size!(Nonterminal, 40);
32  
33  #[derive(Debug, Copy, Clone, PartialEq, Encodable, Decodable)]
34 --- rustc-1.47.0-src.orig/src/librustc_ast/tokenstream.rs       2020-10-07 09:53:22.000000000 +0200
35 +++ rustc-1.47.0-src/src/librustc_ast/tokenstream.rs    2020-10-30 13:52:39.925285960 +0100
36 @@ -130,7 +130,7 @@
37  pub type TreeAndJoint = (TokenTree, IsJoint);
38  
39  // `TokenStream` is used a lot. Make sure it doesn't unintentionally get bigger.
40 -#[cfg(target_arch = "x86_64")]
41 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
42  rustc_data_structures::static_assert_size!(TokenStream, 8);
43  
44  #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable)]
45 --- rustc-1.47.0-src.orig/src/librustc_middle/mir/mod.rs        2020-10-07 09:53:22.000000000 +0200
46 +++ rustc-1.47.0-src/src/librustc_middle/mir/mod.rs     2020-10-30 13:52:39.925285960 +0100
47 @@ -1353,7 +1353,7 @@
48  }
49  
50  // `Statement` is used a lot. Make sure it doesn't unintentionally get bigger.
51 -#[cfg(target_arch = "x86_64")]
52 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
53  static_assert_size!(Statement<'_>, 32);
54  
55  impl Statement<'_> {
56 @@ -1615,7 +1615,7 @@
57  pub type PlaceElem<'tcx> = ProjectionElem<Local, Ty<'tcx>>;
58  
59  // At least on 64 bit systems, `PlaceElem` should not be larger than two pointers.
60 -#[cfg(target_arch = "x86_64")]
61 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
62  static_assert_size!(PlaceElem<'_>, 16);
63  
64  /// Alias for projections as they appear in `UserTypeProjection`, where we
65 --- rustc-1.47.0-src.orig/src/librustc_middle/mir/tcx.rs        2020-10-07 09:53:22.000000000 +0200
66 +++ rustc-1.47.0-src/src/librustc_middle/mir/tcx.rs     2020-10-30 13:52:39.925285960 +0100
67 @@ -17,7 +17,7 @@
68  }
69  
70  // At least on 64 bit systems, `PlaceTy` should not be larger than two or three pointers.
71 -#[cfg(target_arch = "x86_64")]
72 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
73  static_assert_size!(PlaceTy<'_>, 16);
74  
75  impl<'tcx> PlaceTy<'tcx> {
76 --- rustc-1.47.0-src.orig/src/librustc_middle/traits/mod.rs     2020-10-07 09:53:22.000000000 +0200
77 +++ rustc-1.47.0-src/src/librustc_middle/traits/mod.rs  2020-10-30 13:52:39.925285960 +0100
78 @@ -339,7 +339,7 @@
79  }
80  
81  // `ObligationCauseCode` is used a lot. Make sure it doesn't unintentionally get bigger.
82 -#[cfg(target_arch = "x86_64")]
83 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
84  static_assert_size!(ObligationCauseCode<'_>, 32);
85  
86  #[derive(Clone, Debug, PartialEq, Eq, Hash, Lift)]
87 --- rustc-1.47.0-src.orig/src/librustc_middle/ty/mod.rs 2020-10-07 09:53:22.000000000 +0200
88 +++ rustc-1.47.0-src/src/librustc_middle/ty/mod.rs      2020-10-30 13:52:39.925285960 +0100
89 @@ -604,7 +604,7 @@
90  }
91  
92  // `TyS` is used a lot. Make sure it doesn't unintentionally get bigger.
93 -#[cfg(target_arch = "x86_64")]
94 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
95  static_assert_size!(TyS<'_>, 32);
96  
97  impl<'tcx> Ord for TyS<'tcx> {
98 --- rustc-1.47.0-src.orig/src/librustc_middle/ty/sty.rs 2020-10-07 09:53:22.000000000 +0200
99 +++ rustc-1.47.0-src/src/librustc_middle/ty/sty.rs      2020-10-30 13:52:39.925285960 +0100
100 @@ -213,7 +213,7 @@
101  }
102  
103  // `TyKind` is used a lot. Make sure it doesn't unintentionally get bigger.
104 -#[cfg(target_arch = "x86_64")]
105 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
106  static_assert_size!(TyKind<'_>, 24);
107  
108  /// A closure can be modeled as a struct that looks like:
109 --- rustc-1.47.0-src.orig/src/librustc_infer/traits/mod.rs      2020-10-07 09:53:22.000000000 +0200
110 +++ rustc-1.47.0-src/src/librustc_infer/traits/mod.rs   2020-10-30 13:53:29.548462138 +0100
111 @@ -56,7 +56,7 @@
112  pub type TraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;
113  
114  // `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
115 -#[cfg(target_arch = "x86_64")]
116 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
117  static_assert_size!(PredicateObligation<'_>, 40);
118  
119  pub type Obligations<'tcx, O> = Vec<Obligation<'tcx, O>>;
120 --- rustc-1.47.0-src.orig/src/librustc_trait_selection/traits/fulfill.rs        2020-10-07 09:53:22.000000000 +0200
121 +++ rustc-1.47.0-src/src/librustc_trait_selection/traits/fulfill.rs     2020-10-30 13:53:12.381849892 +0100
122 @@ -85,7 +85,7 @@
123  }
124  
125  // `PendingPredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
126 -#[cfg(target_arch = "x86_64")]
127 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
128  static_assert_size!(PendingPredicateObligation<'_>, 64);
129  
130  impl<'a, 'tcx> FulfillmentContext<'tcx> {
131 --- rustc-1.47.0-src.orig/src/librustc_trait_selection/lib.rs   2020-10-07 09:53:22.000000000 +0200
132 +++ rustc-1.47.0-src/src/librustc_trait_selection/lib.rs        2020-10-30 13:52:39.925285960 +0100
133 @@ -20,7 +20,7 @@
134  
135  #[macro_use]
136  extern crate rustc_macros;
137 -#[cfg(target_arch = "x86_64")]
138 +#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
139  #[macro_use]
140  extern crate rustc_data_structures;
141  #[macro_use]
This page took 0.102426 seconds and 3 git commands to generate.