From 0bfc45aa859b94cedeffcbd949f9aaad9f3ac8d8 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 23 Dec 2020 12:18:15 -0800 Subject: [PATCH] Add libz-sys to rustc-workspace-hack. https://github.com/alexcrichton/curl-rust/pull/351 changed curl-rust to no longer enable the default features of libz-sys. Because rustfmt includes rustc-workspace-hack with the rustc-workspace-hack/all-static feature (sometimes), it ends up building libz-sys without the default features. This causes a duplicate with other packages (like rls) which enable the default features. --- Cargo.lock | 1 + src/tools/rustc-workspace-hack/Cargo.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 8fbfa8d6428..3603dbe1d0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3435,6 +3435,7 @@ dependencies = [ "byteorder", "crossbeam-utils 0.7.2", "libc", + "libz-sys", "proc-macro2", "quote", "serde", diff --git a/src/tools/rustc-workspace-hack/Cargo.toml b/src/tools/rustc-workspace-hack/Cargo.toml index 11b175f9e80..1cde0e25ced 100644 --- a/src/tools/rustc-workspace-hack/Cargo.toml +++ b/src/tools/rustc-workspace-hack/Cargo.toml @@ -65,6 +65,8 @@ byteorder = { version = "1", features = ['default', 'std'] } curl-sys = { version = "0.4.13", features = ["http2", "libnghttp2-sys"], optional = true } crossbeam-utils = { version = "0.7.2", features = ["nightly"] } libc = { version = "0.2.79", features = ["align"] } +# Ensure default features of libz-sys, which are disabled in some scenarios. +libz-sys = { version = "1.1.2" } proc-macro2 = { version = "1", features = ["default"] } quote = { version = "1", features = ["default"] } serde = { version = "1.0.82", features = ['derive'] }