Skip to content

Commit d794f84

Browse files
committed
adjusted and reenabled x32 patch
1 parent 20b6445 commit d794f84

File tree

2 files changed

+45
-56
lines changed

2 files changed

+45
-56
lines changed

rust-x32.patch

Lines changed: 44 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- rustc-1.44.1-src/src/librustc_errors/lib.rs.orig 2020-06-17 22:17:05.000000000 +0200
2-
+++ rustc-1.44.1-src/src/librustc_errors/lib.rs 2020-09-19 16:51:37.200375178 +0200
3-
@@ -42,7 +42,7 @@
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 @@
44

55
// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
66
// (See also the comment on `DiagnosticBuilderInner`.)
@@ -9,42 +9,42 @@
99
rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
1010

1111
/// Indicates the confidence in the correctness of a suggestion.
12-
--- rustc-1.44.1-src/src/librustc_ast/ast.rs.orig 2020-06-17 22:17:05.000000000 +0200
13-
+++ rustc-1.44.1-src/src/librustc_ast/ast.rs 2020-09-19 20:00:01.696079898 +0200
14-
@@ -1011,7 +1011,7 @@
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 @@
1515
}
1616

1717
// `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
1818
-#[cfg(target_arch = "x86_64")]
1919
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
20-
rustc_data_structures::static_assert_size!(Expr, 96);
20+
rustc_data_structures::static_assert_size!(Expr, 104);
2121

2222
impl Expr {
23-
--- rustc-1.44.1-src/src/librustc_ast/token.rs.orig 2020-06-17 22:17:05.000000000 +0200
24-
+++ rustc-1.44.1-src/src/librustc_ast/token.rs 2020-09-19 20:00:34.444494028 +0200
25-
@@ -757,7 +757,7 @@
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 @@
2626
}
2727

2828
// `Nonterminal` is used a lot. Make sure it doesn't unintentionally get bigger.
2929
-#[cfg(target_arch = "x86_64")]
3030
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
3131
rustc_data_structures::static_assert_size!(Nonterminal, 40);
3232

33-
impl Nonterminal {
34-
--- rustc-1.44.1-src/src/librustc_ast/tokenstream.rs.orig 2020-06-17 22:17:05.000000000 +0200
35-
+++ rustc-1.44.1-src/src/librustc_ast/tokenstream.rs 2020-09-19 20:01:08.269632279 +0200
36-
@@ -147,7 +147,7 @@
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 @@
3737
pub type TreeAndJoint = (TokenTree, IsJoint);
3838

3939
// `TokenStream` is used a lot. Make sure it doesn't unintentionally get bigger.
4040
-#[cfg(target_arch = "x86_64")]
4141
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
4242
rustc_data_structures::static_assert_size!(TokenStream, 8);
4343

44-
#[derive(Clone, Copy, Debug, PartialEq, RustcEncodable, RustcDecodable)]
45-
--- rustc-1.44.1-src/src/librustc_middle/mir/mod.rs.orig 2020-06-17 22:17:05.000000000 +0200
46-
+++ rustc-1.44.1-src/src/librustc_middle/mir/mod.rs 2020-09-19 21:14:39.635242732 +0200
47-
@@ -1557,7 +1557,7 @@
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 @@
4848
}
4949

5050
// `Statement` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -53,18 +53,18 @@
5353
static_assert_size!(Statement<'_>, 32);
5454

5555
impl Statement<'_> {
56-
@@ -1810,7 +1810,7 @@
57-
impl<'tcx> Copy for PlaceElem<'tcx> {}
56+
@@ -1615,7 +1615,7 @@
57+
pub type PlaceElem<'tcx> = ProjectionElem<Local, Ty<'tcx>>;
5858

5959
// At least on 64 bit systems, `PlaceElem` should not be larger than two pointers.
6060
-#[cfg(target_arch = "x86_64")]
6161
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
6262
static_assert_size!(PlaceElem<'_>, 16);
6363

6464
/// Alias for projections as they appear in `UserTypeProjection`, where we
65-
--- rustc-1.44.1-src/src/librustc_middle/mir/tcx.rs.orig 2020-06-17 22:17:05.000000000 +0200
66-
+++ rustc-1.44.1-src/src/librustc_middle/mir/tcx.rs 2020-09-19 21:15:10.600202818 +0200
67-
@@ -18,7 +18,7 @@
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 @@
6868
}
6969

7070
// At least on 64 bit systems, `PlaceTy` should not be larger than two or three pointers.
@@ -73,20 +73,20 @@
7373
static_assert_size!(PlaceTy<'_>, 16);
7474

7575
impl<'tcx> PlaceTy<'tcx> {
76-
--- rustc-1.44.1-src/src/librustc_middle/traits/mod.rs.orig 2020-06-17 22:17:05.000000000 +0200
77-
+++ rustc-1.44.1-src/src/librustc_middle/traits/mod.rs 2020-09-19 21:15:40.648448077 +0200
78-
@@ -276,7 +276,7 @@
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 @@
7979
}
8080

8181
// `ObligationCauseCode` is used a lot. Make sure it doesn't unintentionally get bigger.
8282
-#[cfg(target_arch = "x86_64")]
8383
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
8484
static_assert_size!(ObligationCauseCode<'_>, 32);
8585

86-
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
87-
--- rustc-1.44.1-src/src/librustc_middle/ty/mod.rs.orig 2020-06-17 22:17:05.000000000 +0200
88-
+++ rustc-1.44.1-src/src/librustc_middle/ty/mod.rs 2020-09-19 21:16:08.469909685 +0200
89-
@@ -614,7 +614,7 @@
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 @@
9090
}
9191

9292
// `TyS` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -95,9 +95,9 @@
9595
static_assert_size!(TyS<'_>, 32);
9696

9797
impl<'tcx> Ord for TyS<'tcx> {
98-
--- rustc-1.44.1-src/src/librustc_middle/ty/sty.rs.orig 2020-06-17 22:17:05.000000000 +0200
99-
+++ rustc-1.44.1-src/src/librustc_middle/ty/sty.rs 2020-09-19 21:16:35.264650688 +0200
100-
@@ -212,7 +212,7 @@
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 @@
101101
}
102102

103103
// `TyKind` is used a lot. Make sure it doesn't unintentionally get bigger.
@@ -106,31 +106,31 @@
106106
static_assert_size!(TyKind<'_>, 24);
107107

108108
/// A closure can be modeled as a struct that looks like:
109-
--- rustc-1.44.1-src/src/librustc_infer/traits/mod.rs.orig 2020-06-17 22:17:05.000000000 +0200
110-
+++ rustc-1.44.1-src/src/librustc_infer/traits/mod.rs 2020-09-19 22:11:38.115874035 +0200
111-
@@ -57,7 +57,7 @@
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 @@
112112
pub type TraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;
113113

114114
// `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
115115
-#[cfg(target_arch = "x86_64")]
116116
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
117-
static_assert_size!(PredicateObligation<'_>, 112);
117+
static_assert_size!(PredicateObligation<'_>, 40);
118118

119119
pub type Obligations<'tcx, O> = Vec<Obligation<'tcx, O>>;
120-
--- rustc-1.44.1-src/src/librustc_trait_selection/traits/fulfill.rs.orig 2020-06-17 22:17:05.000000000 +0200
121-
+++ rustc-1.44.1-src/src/librustc_trait_selection/traits/fulfill.rs 2020-09-20 07:47:50.724260889 +0200
122-
@@ -80,7 +80,7 @@
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 @@
123123
}
124124

125125
// `PendingPredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
126126
-#[cfg(target_arch = "x86_64")]
127127
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
128-
static_assert_size!(PendingPredicateObligation<'_>, 136);
128+
static_assert_size!(PendingPredicateObligation<'_>, 64);
129129

130130
impl<'a, 'tcx> FulfillmentContext<'tcx> {
131-
--- rustc-1.44.1-src/src/librustc_trait_selection/lib.rs.orig 2020-06-17 22:17:05.000000000 +0200
132-
+++ rustc-1.44.1-src/src/librustc_trait_selection/lib.rs 2020-09-20 09:46:06.127051487 +0200
133-
@@ -22,7 +22,7 @@
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 @@
134134

135135
#[macro_use]
136136
extern crate rustc_macros;
@@ -139,14 +139,3 @@
139139
#[macro_use]
140140
extern crate rustc_data_structures;
141141
#[macro_use]
142-
--- rustc-1.44.1-src/src/librustc_mir_build/hair/mod.rs.orig 2020-06-17 22:17:05.000000000 +0200
143-
+++ rustc-1.44.1-src/src/librustc_mir_build/hair/mod.rs 2020-09-20 11:22:53.936804032 +0200
144-
@@ -94,7 +94,7 @@
145-
}
146-
147-
// `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
148-
-#[cfg(target_arch = "x86_64")]
149-
+#[cfg(all(target_arch = "x86_64", target_pointer_size = "64"))]
150-
rustc_data_structures::static_assert_size!(Expr<'_>, 168);
151-
152-
/// The Hair trait implementor lowers their expressions (`&'tcx H::Expr`)

rust.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Dopełnianie parametrów polecenia cargo w powłoce Zsh.
277277
%prep
278278
%setup -q -n %{rustc_package}
279279
# irrelevant when not building rustc for x32
280-
#patch0 -p1
280+
%patch0 -p1
281281

282282
%if %{with bootstrap}
283283
%ifarch %{x8664} x32

0 commit comments

Comments
 (0)