summaryrefslogtreecommitdiff
path: root/librewolf/debian/patches/debian-hacks/Relax-MSRV-to-1.56.0.patch
blob: 46b10357428a82bcc78dbf1f42be009324fc9ceb (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
From: Mike Hommey <mh@glandium.org>
Date: Wed, 9 Mar 2022 07:21:56 +0900
Subject: Relax MSRV to 1.56.0

---
 Cargo.lock                                             | 2 ++
 config/makefiles/rust.mk                               | 2 +-
 python/mozboot/mozboot/util.py                         | 2 +-
 servo/components/style/Cargo.toml                      | 1 +
 servo/components/style/build.rs                        | 4 ++++
 servo/components/style/lib.rs                          | 1 +
 servo/components/style/stylesheets/page_rule.rs        | 2 +-
 servo/components/style/stylist.rs                      | 2 +-
 third_party/rust/audioipc2-client/.cargo-checksum.json | 2 +-
 third_party/rust/audioipc2-client/Cargo.toml           | 3 +++
 third_party/rust/audioipc2-client/build.rs             | 7 +++++++
 third_party/rust/audioipc2-client/src/lib.rs           | 1 +
 third_party/rust/wgpu-hal/.cargo-checksum.json         | 2 +-
 third_party/rust/wgpu-hal/src/gles/egl.rs              | 6 ++++--
 14 files changed, 29 insertions(+), 8 deletions(-)
 create mode 100644 third_party/rust/audioipc2-client/build.rs

diff --git a/Cargo.lock b/Cargo.lock
index 391b904..77c1d86 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -297,6 +297,7 @@ dependencies = [
  "audioipc2",
  "cubeb-backend",
  "log",
+ "rustc_version",
 ]
 
 [[package]]
@@ -4925,6 +4926,7 @@ dependencies = [
  "precomputed-hash",
  "rayon",
  "regex",
+ "rustc_version",
  "selectors",
  "serde",
  "servo_arc",
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
index ce3652d..c8a966b 100644
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -240,7 +240,7 @@ endif
 endif
 
 ifndef RUSTC_BOOTSTRAP
-RUSTC_BOOTSTRAP := mozglue_static,qcms
+RUSTC_BOOTSTRAP := mozglue_static,qcms,style,audioipc2_client
 ifdef MOZ_RUST_SIMD
 RUSTC_BOOTSTRAP := $(RUSTC_BOOTSTRAP),encoding_rs,packed_simd
 endif
diff --git a/python/mozboot/mozboot/util.py b/python/mozboot/mozboot/util.py
index 1d6d546..fdbf48f 100644
--- a/python/mozboot/mozboot/util.py
+++ b/python/mozboot/mozboot/util.py
@@ -23,7 +23,7 @@ if sys.version_info < (3,):
 else:
     from urllib.request import urlopen
 
-MINIMUM_RUST_VERSION = "1.57.0"
+MINIMUM_RUST_VERSION = "1.56.0"
 
 
 def get_tools_dir(srcdir=False):
diff --git a/servo/components/style/Cargo.toml b/servo/components/style/Cargo.toml
index 7e8a285..4c51e66 100644
--- a/servo/components/style/Cargo.toml
+++ b/servo/components/style/Cargo.toml
@@ -85,3 +85,4 @@ regex = {version = "1.0", optional = true, default-features = false, features =
 walkdir = "2.1.4"
 toml = {version = "0.4.5", optional = true, default-features = false}
 mozbuild = {version = "0.1", optional = true}
+rustc_version = "0.2"
diff --git a/servo/components/style/build.rs b/servo/components/style/build.rs
index 2247e87..51e0a84 100644
--- a/servo/components/style/build.rs
+++ b/servo/components/style/build.rs
@@ -8,6 +8,7 @@ extern crate lazy_static;
 use std::env;
 use std::path::Path;
 use std::process::{exit, Command};
+use rustc_version::{version, Version};
 use walkdir::WalkDir;
 
 #[cfg(feature = "gecko")]
@@ -88,4 +89,7 @@ fn main() {
     println!("cargo:out_dir={}", env::var("OUT_DIR").unwrap());
     generate_properties(engine);
     build_gecko::generate();
+    if version().unwrap() < Version::parse("1.57.0-alpha").unwrap() {
+        println!("cargo:rustc-cfg=try_reserve");
+    }
 }
diff --git a/servo/components/style/lib.rs b/servo/components/style/lib.rs
index 9ea9188..f4ffaf8 100644
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -24,6 +24,7 @@
 //! [selectors]: ../selectors/index.html
 
 #![deny(missing_docs)]
+#![cfg_attr(try_reserve, feature(try_reserve))]
 
 #[macro_use]
 extern crate bitflags;
diff --git a/servo/components/style/stylesheets/page_rule.rs b/servo/components/style/stylesheets/page_rule.rs
index ee156cf..7048ea0 100644
--- a/servo/components/style/stylesheets/page_rule.rs
+++ b/servo/components/style/stylesheets/page_rule.rs
@@ -32,7 +32,7 @@ impl PageSelector {
     /// This does not currently take pseudo selectors into account.
     #[inline]
     pub fn ident_matches(&self, other: &CustomIdent) -> bool {
-        self.0.0 == other.0
+        (self.0).0 == other.0
     }
 }
 
diff --git a/servo/components/style/stylist.rs b/servo/components/style/stylist.rs
index 02610fe..63e2209 100644
--- a/servo/components/style/stylist.rs
+++ b/servo/components/style/stylist.rs
@@ -1730,7 +1730,7 @@ impl ExtraStyleData {
             // TODO: Handle pseudo-classes
             self.pages.named.try_reserve(page_rule.selectors.0.len())?;
             for name in page_rule.selectors.as_slice() {
-                let vec = self.pages.named.entry(name.0.0.clone()).or_default();
+                let vec = self.pages.named.entry((name.0).0.clone()).or_default();
                 vec.try_reserve(1)?;
                 vec.push(PageRuleData{layer, rule: rule.clone()});
             }
diff --git a/third_party/rust/audioipc2-client/.cargo-checksum.json b/third_party/rust/audioipc2-client/.cargo-checksum.json
index 6c0cbc0..f033549 100644
--- a/third_party/rust/audioipc2-client/.cargo-checksum.json
+++ b/third_party/rust/audioipc2-client/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"722e0313d4de90477ae34dbb95ae7eeff27622329c5689bb4ce6bcd2006c6263","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/context.rs":"33231853817615e01fd1a0f67f69a176d19119bbebb7dc417e96ed88dd3a8d34","src/lib.rs":"c4a6797734489280f6b97dd72c9e51a7bd7be4104592eece3929e29d45cbca4a","src/send_recv.rs":"064a657c845762be1dbcbbfc18b3f8a51582eb540def8d2ceecf200184ad4f7a","src/stream.rs":"a6c07796e6fe704cfa6baf8b904e7ffe874d3c884d44d4ed307e668dec25452b"},"package":null}
\ No newline at end of file
+{"files":{"Cargo.toml":"bdde450635daff287c6a94115c801ccc274766f455dd1606dbdf595158668d4f","build.rs":"91de386f621a91eb125484980f352d52549826c27d1ddff53ce6e3835c79e61d","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/context.rs":"33231853817615e01fd1a0f67f69a176d19119bbebb7dc417e96ed88dd3a8d34","src/lib.rs":"78c7060e55536cbff4681a300e73c7fa0ff52953caa668c84035d2e975b6871d","src/send_recv.rs":"064a657c845762be1dbcbbfc18b3f8a51582eb540def8d2ceecf200184ad4f7a","src/stream.rs":"a6c07796e6fe704cfa6baf8b904e7ffe874d3c884d44d4ed307e668dec25452b"},"package":null}
diff --git a/third_party/rust/audioipc2-client/Cargo.toml b/third_party/rust/audioipc2-client/Cargo.toml
index fe71197..ddab501 100644
--- a/third_party/rust/audioipc2-client/Cargo.toml
+++ b/third_party/rust/audioipc2-client/Cargo.toml
@@ -18,3 +18,6 @@ log = "0.4"
 version = "0.26.0"
 default_features = false
 features = ["winapi"]
+
+[build-dependencies]
+rustc_version = "0.2"
diff --git a/third_party/rust/audioipc2-client/build.rs b/third_party/rust/audioipc2-client/build.rs
new file mode 100644
index 0000000..ad093ae
--- /dev/null
+++ b/third_party/rust/audioipc2-client/build.rs
@@ -0,0 +1,7 @@
+use rustc_version::{version, Version};
+
+fn main() {
+    if version().unwrap() < Version::parse("1.57.0-alpha").unwrap() {
+        println!("cargo:rustc-cfg=try_reserve");
+    }
+}
diff --git a/third_party/rust/audioipc2-client/src/lib.rs b/third_party/rust/audioipc2-client/src/lib.rs
index 51a68af..75013d2 100644
--- a/third_party/rust/audioipc2-client/src/lib.rs
+++ b/third_party/rust/audioipc2-client/src/lib.rs
@@ -3,6 +3,7 @@
 // This program is made available under an ISC-style license.  See the
 // accompanying file LICENSE for details.
 #![warn(unused_extern_crates)]
+#![cfg_attr(try_reserve, feature(try_reserve))]
 
 #[macro_use]
 extern crate log;
diff --git a/third_party/rust/wgpu-hal/.cargo-checksum.json b/third_party/rust/wgpu-hal/.cargo-checksum.json
index 43f4b8c..15f46e6 100644
--- a/third_party/rust/wgpu-hal/.cargo-checksum.json
+++ b/third_party/rust/wgpu-hal/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"3862315ca7f4457023d24cc734caf97344767b109b6aff70bf521842f23e057a","README.md":"78377f5876fafd77963eff7e3c2ba3a7e3ad5cf9201b09ed5612e49c2288eb18","examples/halmark/main.rs":"9985c489565558c44023c2e0939c6f23f73840d336ebc552063277a85ea5136f","examples/halmark/shader.wgsl":"d63ba820574d2809b8a5d16342fddbede5dd0ff0024b3448c947fb7da896dd8d","examples/raw-gles.rs":"e1a47d82b58eef8a74fee37f9e2d190bf33ed764818af532c31fe2ffd160d070","src/auxil/mod.rs":"80e81fb7421f29553922fe67f16859cb5a3e2e199413f10a87e58253bb4fe6f6","src/auxil/renderdoc.rs":"3a4da908ebd6230177ca55c541c8278639e83d78badb4595a941aea30dd7f80f","src/dx12/adapter.rs":"7ce0b5398973584df4a314627c9958cfd120e31533c222a7a81e9e643552c27f","src/dx12/command.rs":"f8b84a576a5f2eea82d5c001ea1a7d4552f9fc7a7d0bc496a096ac3ffee2ff14","src/dx12/conv.rs":"7dfa5fb67b11acd2ffcee400b7e737aa1b08ee1f22d93d9fffaab5f275efee44","src/dx12/descriptor.rs":"c0108edad4a7a8c77d52c6172844d4310820edb400e351c843d56aab997a5dc2","src/dx12/device.rs":"fed1f2286c153998448bf07c423f320eade15d7dbce0a1d1d719f822bebd2936","src/dx12/instance.rs":"e93de85ddf6772ca366e02b7d0b4ee4d619164fd4700df4a389515f4f4500ebc","src/dx12/mod.rs":"b11a6b29ecb9dce95ffeb0b65d69d0af0a6adb1437faf0f561c82010ca6306c9","src/dx12/view.rs":"7449d7459e39178491e76812f154ef2895f8137e944c1c821c0d441fdb173cae","src/empty.rs":"6bf65e405f63eff49b25d079af644b352b95a9c7edcf3a57be2e96a50307b66b","src/gles/adapter.rs":"854215a4a93eacb8f15bb4e905de6cf6d064b5e4773cc48f64f0acb0c1c50811","src/gles/command.rs":"557effbdf8a885fec118e926f1e322253b4e4f417d4f7efbc300f7b75580e0f5","src/gles/conv.rs":"ec87ddf4b509a394f5faaacdae2e2eb119f100585f5850e4f52ccb8687e67452","src/gles/device.rs":"6ff31ffe2f5266c73f3de787ca06da8347ae19ec178792cd215b844cc309eaf9","src/gles/egl.rs":"0d8993a0d722063042ee9fa83a4de868e91689f1ce8c8aec47e538a6c0f38553","src/gles/mod.rs":"714ce10a4929a3f0d9a32bb0bbbfbe87a3b3162a8532b2cd79f228d32b958dd1","src/gles/queue.rs":"fea36dc55becee4493cea6b554e8d7a8ffe946201eb21c563e7dc4bcacab3bcd","src/gles/shaders/clear.frag":"aac702eed9ece5482db5ba6783a678b119a5e7802b1ecf93f4975dee8acab0b3","src/gles/shaders/clear.vert":"8f636168e1da2cac48091c466a543c3b09fb4a0dd8c60c1c9bf34cc890766740","src/gles/shaders/present.frag":"dd9a43c339a2fa4ccf7f6a1854c6f400cabf271a7d5e9230768e9f39d47f3ff5","src/gles/shaders/present.vert":"6e85d489403d80b81cc94790730bb53b309dfc5eeede8f1ea3412a660f31d357","src/gles/web.rs":"083500c0b36d079a82754895d06b993ea8ed4393690b226c85f07cbec373a730","src/lib.rs":"354670f72b69e3c6b704b9668dab681032d48ff2a650be3c07807d803582900c","src/metal/adapter.rs":"daae4f4c8097dd2fa4c915b1521457e38d9f143e468c45daba5b124f06608359","src/metal/command.rs":"233e646076d94b5d2b109f254ba129b8dcc30f683b30178a66d59bd7e2a25b78","src/metal/conv.rs":"0f8065cbe54b499476381fd93002a377d6ae756d63d5d8dacb18fe292dfa30eb","src/metal/device.rs":"b0dc77b3567b4d456118d7428a0594f0ace5c1a3bb75cee9b24a61645feae0ba","src/metal/mod.rs":"29092cc039a844611b6e6755e735ec232a947c25531fb3c185a4a9422891e6af","src/metal/surface.rs":"74f81d37f0f1362603c26fd085ad2821f82810e2b5c5f816a6c1e83c5295d47b","src/vulkan/adapter.rs":"627d67199a49ebffa8e183cb68b61ee8646418ac0f81e8634acccddccc8c0ac4","src/vulkan/command.rs":"60d1867acd0e46c34dabecea708cd776a1f435721b6673a506b5bb8aee87ff80","src/vulkan/conv.rs":"241764384cb35a7fbd453923fc0e968909689e4698e69ff61df87d2aa6cf37cb","src/vulkan/device.rs":"a88d85962e1d819b903a4b6f1b2e2822ecf770d05fa5a16673e87b77fbadc38f","src/vulkan/instance.rs":"b258b87760150feda3e1f23166fd5e6067b0af0c9ed404e0208433b3b10d42bd","src/vulkan/mod.rs":"bb4d3c01a7a75fa167f03123794f747a21e2cbe0ec93fbf473b1d40f9b2c2d42"},"package":null}
\ No newline at end of file
+{"files":{"Cargo.toml":"3862315ca7f4457023d24cc734caf97344767b109b6aff70bf521842f23e057a","README.md":"78377f5876fafd77963eff7e3c2ba3a7e3ad5cf9201b09ed5612e49c2288eb18","examples/halmark/main.rs":"9985c489565558c44023c2e0939c6f23f73840d336ebc552063277a85ea5136f","examples/halmark/shader.wgsl":"d63ba820574d2809b8a5d16342fddbede5dd0ff0024b3448c947fb7da896dd8d","examples/raw-gles.rs":"e1a47d82b58eef8a74fee37f9e2d190bf33ed764818af532c31fe2ffd160d070","src/auxil/mod.rs":"80e81fb7421f29553922fe67f16859cb5a3e2e199413f10a87e58253bb4fe6f6","src/auxil/renderdoc.rs":"3a4da908ebd6230177ca55c541c8278639e83d78badb4595a941aea30dd7f80f","src/dx12/adapter.rs":"7ce0b5398973584df4a314627c9958cfd120e31533c222a7a81e9e643552c27f","src/dx12/command.rs":"f8b84a576a5f2eea82d5c001ea1a7d4552f9fc7a7d0bc496a096ac3ffee2ff14","src/dx12/conv.rs":"7dfa5fb67b11acd2ffcee400b7e737aa1b08ee1f22d93d9fffaab5f275efee44","src/dx12/descriptor.rs":"c0108edad4a7a8c77d52c6172844d4310820edb400e351c843d56aab997a5dc2","src/dx12/device.rs":"fed1f2286c153998448bf07c423f320eade15d7dbce0a1d1d719f822bebd2936","src/dx12/instance.rs":"e93de85ddf6772ca366e02b7d0b4ee4d619164fd4700df4a389515f4f4500ebc","src/dx12/mod.rs":"b11a6b29ecb9dce95ffeb0b65d69d0af0a6adb1437faf0f561c82010ca6306c9","src/dx12/view.rs":"7449d7459e39178491e76812f154ef2895f8137e944c1c821c0d441fdb173cae","src/empty.rs":"6bf65e405f63eff49b25d079af644b352b95a9c7edcf3a57be2e96a50307b66b","src/gles/adapter.rs":"854215a4a93eacb8f15bb4e905de6cf6d064b5e4773cc48f64f0acb0c1c50811","src/gles/command.rs":"557effbdf8a885fec118e926f1e322253b4e4f417d4f7efbc300f7b75580e0f5","src/gles/conv.rs":"ec87ddf4b509a394f5faaacdae2e2eb119f100585f5850e4f52ccb8687e67452","src/gles/device.rs":"6ff31ffe2f5266c73f3de787ca06da8347ae19ec178792cd215b844cc309eaf9","src/gles/egl.rs":"2018feea9faca02bc5a897fd0e64489e4491129f139b760651ca795f564ed7ca","src/gles/mod.rs":"714ce10a4929a3f0d9a32bb0bbbfbe87a3b3162a8532b2cd79f228d32b958dd1","src/gles/queue.rs":"fea36dc55becee4493cea6b554e8d7a8ffe946201eb21c563e7dc4bcacab3bcd","src/gles/shaders/clear.frag":"aac702eed9ece5482db5ba6783a678b119a5e7802b1ecf93f4975dee8acab0b3","src/gles/shaders/clear.vert":"8f636168e1da2cac48091c466a543c3b09fb4a0dd8c60c1c9bf34cc890766740","src/gles/shaders/present.frag":"dd9a43c339a2fa4ccf7f6a1854c6f400cabf271a7d5e9230768e9f39d47f3ff5","src/gles/shaders/present.vert":"6e85d489403d80b81cc94790730bb53b309dfc5eeede8f1ea3412a660f31d357","src/gles/web.rs":"083500c0b36d079a82754895d06b993ea8ed4393690b226c85f07cbec373a730","src/lib.rs":"354670f72b69e3c6b704b9668dab681032d48ff2a650be3c07807d803582900c","src/metal/adapter.rs":"daae4f4c8097dd2fa4c915b1521457e38d9f143e468c45daba5b124f06608359","src/metal/command.rs":"233e646076d94b5d2b109f254ba129b8dcc30f683b30178a66d59bd7e2a25b78","src/metal/conv.rs":"0f8065cbe54b499476381fd93002a377d6ae756d63d5d8dacb18fe292dfa30eb","src/metal/device.rs":"b0dc77b3567b4d456118d7428a0594f0ace5c1a3bb75cee9b24a61645feae0ba","src/metal/mod.rs":"29092cc039a844611b6e6755e735ec232a947c25531fb3c185a4a9422891e6af","src/metal/surface.rs":"74f81d37f0f1362603c26fd085ad2821f82810e2b5c5f816a6c1e83c5295d47b","src/vulkan/adapter.rs":"627d67199a49ebffa8e183cb68b61ee8646418ac0f81e8634acccddccc8c0ac4","src/vulkan/command.rs":"60d1867acd0e46c34dabecea708cd776a1f435721b6673a506b5bb8aee87ff80","src/vulkan/conv.rs":"241764384cb35a7fbd453923fc0e968909689e4698e69ff61df87d2aa6cf37cb","src/vulkan/device.rs":"a88d85962e1d819b903a4b6f1b2e2822ecf770d05fa5a16673e87b77fbadc38f","src/vulkan/instance.rs":"b258b87760150feda3e1f23166fd5e6067b0af0c9ed404e0208433b3b10d42bd","src/vulkan/mod.rs":"bb4d3c01a7a75fa167f03123794f747a21e2cbe0ec93fbf473b1d40f9b2c2d42"},"package":null}
diff --git a/third_party/rust/wgpu-hal/src/gles/egl.rs b/third_party/rust/wgpu-hal/src/gles/egl.rs
index ea49dfb..d3ac0a7 100644
--- a/third_party/rust/wgpu-hal/src/gles/egl.rs
+++ b/third_party/rust/wgpu-hal/src/gles/egl.rs
@@ -951,14 +951,16 @@ impl crate::Surface<super::Api> for Surface {
                 let (mut temp_xlib_handle, mut temp_xcb_handle);
                 #[allow(trivial_casts)]
                 let native_window_ptr = match (self.wsi.kind, self.raw_window_handle) {
-                    (WindowKind::Unknown | WindowKind::X11, Rwh::Xlib(handle)) => {
+                    (WindowKind::Unknown, Rwh::Xlib(handle)) |
+                    (WindowKind::X11, Rwh::Xlib(handle)) => {
                         temp_xlib_handle = handle.window;
                         &mut temp_xlib_handle as *mut _ as *mut std::ffi::c_void
                     }
                     (WindowKind::AngleX11, Rwh::Xlib(handle)) => {
                         handle.window as *mut std::ffi::c_void
                     }
-                    (WindowKind::Unknown | WindowKind::X11, Rwh::Xcb(handle)) => {
+                    (WindowKind::Unknown, Rwh::Xcb(handle)) |
+                    (WindowKind::X11, Rwh::Xcb(handle)) => {
                         temp_xcb_handle = handle.window;
                         &mut temp_xcb_handle as *mut _ as *mut std::ffi::c_void
                     }
bgstack15