--- indexmap.orig/src/map.rs
+++ indexmap/src/map.rs
@@ -11,3 +11,3 @@
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests;
--- indexmap.orig/src/map/slice.rs
+++ indexmap/src/map/slice.rs
@@ -425,3 +425,3 @@
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
--- indexmap.orig/src/set.rs
+++ indexmap/src/set.rs
@@ -5,3 +5,3 @@
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests;
--- indexmap.orig/src/set/slice.rs
+++ indexmap/src/set/slice.rs
@@ -292,3 +292,3 @@
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
--- indexmap.orig/benches/bench.rs
+++ indexmap/benches/bench.rs
@@ -0,0 +1 @@
+#![cfg(feature = "std")]
--- indexmap.orig/benches/faststring.rs
+++ indexmap/benches/faststring.rs
@@ -0,0 +1 @@
+#![cfg(feature = "std")]
--- indexmap.orig/tests/equivalent_trait.rs
+++ indexmap/tests/equivalent_trait.rs
@@ -0,0 +1 @@
+#![cfg(feature = "std")]
--- indexmap.orig/tests/macros_full_path.rs
+++ indexmap/tests/macros_full_path.rs
@@ -0,0 +1 @@
+#![cfg(feature = "std")]
--- indexmap.orig/tests/quick.rs
+++ indexmap/tests/quick.rs
@@ -0,0 +1 @@
+#![cfg(feature = "std")]
--- indexmap.orig/tests/tests.rs
+++ indexmap/tests/tests.rs
@@ -0,0 +1 @@
+#![cfg(feature = "std")]
--- indexmap.orig/src/rayon/map.rs
+++ indexmap/src/rayon/map.rs
@@ -573,3 +573,3 @@
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
--- indexmap.orig/src/rayon/set.rs
+++ indexmap/src/rayon/set.rs
@@ -611,3 +611,3 @@
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
