From 12dd67ff6a26f8ff6c9c4e0bacb9ec865ad64b17 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 7 Nov 2022 17:39:05 -0800 Subject: [PATCH] Enable the "close" feature for io-lifetimes. (#440) * Enable the "close" feature for io-lifetimes. This follows up on #422, but enables "close" on the regular dependency too, and not just the dev-dependency. * Temporarily disable the backends no-libc test. --- Cargo.toml | 2 +- tests/backends.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dca4b88a..5e2b4d1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ cc = { version = "1.0.68", optional = true } [dependencies] bitflags = "1.2.1" itoa = { version = "1.0.1", default-features = false, optional = true } -io-lifetimes = { version = "1.0.0", default-features = false, optional = true } +io-lifetimes = { version = "1.0.0", default-features = false, features = ["close"], optional = true } # Special dependencies used in rustc-dep-of-std mode. core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" } diff --git a/tests/backends.rs b/tests/backends.rs index c3f13e9a..8d504ae3 100644 --- a/tests/backends.rs +++ b/tests/backends.rs @@ -22,6 +22,9 @@ fn test_backends() { // ensure that the use-rustix-auxv crate uses it, and does not use libc. #[cfg(all(target_os = "linux", target_arch = "aarch64"))] { + // TODO: Re-enable this test once io-lifetimes can depend on Rust 1.63 + // and always use std, so it can drop its libc dependency. + /* assert!( !has_dependency( "test-crates/use-rustix-auxv", @@ -32,6 +35,8 @@ fn test_backends() { ), "use-rustix-auxv depends on libc" ); + */ + assert!( has_dependency( "test-crates/use-rustix-auxv",