d4616c
--- rustc-beta-src/Cargo.lock.orig	2022-06-22 14:03:26.309745526 -0700
d4616c
+++ rustc-beta-src/Cargo.lock	2022-06-22 14:03:26.310745506 -0700
d4616c
@@ -990,7 +990,6 @@
872d83
 dependencies = [
872d83
  "cc",
872d83
  "libc",
872d83
- "libnghttp2-sys",
872d83
  "libz-sys",
872d83
  "openssl-sys",
872d83
  "pkg-config",
d4616c
@@ -2101,16 +2100,6 @@
8a888b
 checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
872d83
 
872d83
 [[package]]
872d83
-name = "libnghttp2-sys"
872d83
-version = "0.1.4+1.41.0"
872d83
-source = "registry+https://github.com/rust-lang/crates.io-index"
872d83
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
872d83
-dependencies = [
872d83
- "cc",
872d83
- "libc",
872d83
-]
872d83
-
872d83
-[[package]]
872d83
 name = "libz-sys"
ec0d56
 version = "1.1.3"
872d83
 source = "registry+https://github.com/rust-lang/crates.io-index"
d4616c
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig	2022-06-22 14:03:26.310745506 -0700
d4616c
+++ rustc-beta-src/src/tools/cargo/Cargo.toml	2022-06-22 14:04:22.058596881 -0700
ec0d56
@@ -22,7 +22,7 @@
d4616c
 cargo-util = { path = "crates/cargo-util", version = "0.1.3" }
d4616c
 crates-io = { path = "crates/crates-io", version = "0.34.0" }
872d83
 crossbeam-utils = "0.8"
ec0d56
-curl = { version = "0.4.41", features = ["http2"] }
ec0d56
+curl = { version = "0.4.41", features = [] }
ec0d56
 curl-sys = "0.4.50"
ec0d56
 env_logger = "0.9.0"
872d83
 pretty_env_logger = { version = "0.4", optional = true }
d4616c
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig	2022-06-13 07:34:54.000000000 -0700
d4616c
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs	2022-06-22 14:03:26.311745485 -0700
d4616c
@@ -183,16 +183,8 @@
d4616c
         }
d4616c
         self.fetch_started = true;
d4616c
 
d4616c
-        // We've enabled the `http2` feature of `curl` in Cargo, so treat
d4616c
-        // failures here as fatal as it would indicate a build-time problem.
d4616c
-        self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
d4616c
-
d4616c
-        self.multi
d4616c
-            .pipelining(false, self.multiplexing)
d4616c
-            .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
d4616c
-
d4616c
-        // let's not flood the server with connections
d4616c
-        self.multi.set_max_host_connections(2)?;
d4616c
+        // Multiplexing is disabled because the system libcurl doesn't support it.
d4616c
+        self.multiplexing = false;
d4616c
 
d4616c
         self.config
d4616c
             .shell()
d4616c
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig	2022-06-13 07:34:54.000000000 -0700
d4616c
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs	2022-06-22 14:03:26.311745485 -0700
d4616c
@@ -403,16 +403,9 @@
d4616c
         sources: SourceMap<'cfg>,
d4616c
         config: &'cfg Config,
d4616c
     ) -> CargoResult<PackageSet<'cfg>> {
d4616c
-        // We've enabled the `http2` feature of `curl` in Cargo, so treat
d4616c
-        // failures here as fatal as it would indicate a build-time problem.
872d83
-        let mut multi = Multi::new();
872d83
-        let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
872d83
-        multi
872d83
-            .pipelining(false, multiplexing)
8a888b
-            .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
872d83
-
872d83
-        // let's not flood crates.io with connections
872d83
-        multi.set_max_host_connections(2)?;
d4616c
+        // Multiplexing is disabled because the system libcurl doesn't support it.
872d83
+        let multi = Multi::new();
872d83
+        let multiplexing = false;
872d83
 
872d83
         Ok(PackageSet {
872d83
             packages: package_ids
d4616c
@@ -658,7 +651,7 @@
872d83
 macro_rules! try_old_curl {
872d83
     ($e:expr, $msg:expr) => {
872d83
         let result = $e;
872d83
-        if cfg!(target_os = "macos") {
872d83
+        if cfg!(any(target_os = "linux", target_os = "macos")) {
872d83
             if let Err(e) = result {
872d83
                 warn!("ignoring libcurl {} error: {}", $msg, e);
872d83
             }