diff --git a/Cargo.toml b/Cargo.toml index 6eceed33..31bb9e0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,7 +82,7 @@ serde = { version = "1.0.60", optional = true, default-features = false } critical-section = { version = "1", optional = true } [dev-dependencies] -test-helper = { path = "tests/helper", features = ["std"] } +test-helper = { path = "tests/helper", features = ["std", "critical-section"] } build-context = "0.1" crossbeam-utils = "=0.8.16" # The latest crossbeam-utils requires Rust 1.60 diff --git a/tests/helper/Cargo.toml b/tests/helper/Cargo.toml index cca2b50a..42ca610e 100644 --- a/tests/helper/Cargo.toml +++ b/tests/helper/Cargo.toml @@ -11,7 +11,7 @@ doc = false test = false [features] -std = ["critical-section", "fs-err", "libc", "windows-sys"] +std = ["fs-err", "libc", "windows-sys"] [dependencies] critical-section = { version = "1", optional = true, features = ["restore-state-bool"] } diff --git a/tests/helper/src/lib.rs b/tests/helper/src/lib.rs index be29199b..e9640e03 100644 --- a/tests/helper/src/lib.rs +++ b/tests/helper/src/lib.rs @@ -24,6 +24,7 @@ pub mod sys; #[cfg(feature = "std")] pub mod cpuinfo; #[cfg(feature = "std")] +#[cfg(feature = "critical-section")] mod critical_section_std; #[cfg(feature = "std")] pub mod once_lock;