File: fix-tests-no-default-features.patch

package info (click to toggle)
rust-indexmap 2.12.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 992 kB
  • sloc: makefile: 2
file content (119 lines) | stat: -rw-r--r-- 2,284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
--- a/src/map.rs
+++ b/src/map.rs
@@ -10,7 +10,7 @@ mod slice;
 #[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
 pub mod serde_seq;
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests;
 
 pub use self::core::raw_entry_v1::{self, RawEntryApiV1};
--- a/src/borsh.rs
+++ b/src/borsh.rs
@@ -97,7 +97,7 @@ fn check_zst<T>() -> Result<()> {
     Ok(())
 }
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod borsh_tests {
     use super::*;
 
--- a/src/map/slice.rs
+++ b/src/map/slice.rs
@@ -546,7 +546,7 @@ impl_index!(
     (Bound<usize>, Bound<usize>)
 );
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
     use super::*;
 
--- a/src/set.rs
+++ b/src/set.rs
@@ -4,7 +4,7 @@ mod iter;
 mod mutable;
 mod slice;
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests;
 
 pub use self::iter::{
--- a/src/set/slice.rs
+++ b/src/set/slice.rs
@@ -358,7 +358,7 @@ impl_index!(
     (Bound<usize>, Bound<usize>)
 );
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
     use super::*;
 
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "std")]
 #![feature(test)]
 
 extern crate test;
--- a/benches/faststring.rs
+++ b/benches/faststring.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "std")]
 #![feature(test)]
 
 extern crate test;
--- a/tests/equivalent_trait.rs
+++ b/tests/equivalent_trait.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "std")]
 use indexmap::indexmap;
 use indexmap::Equivalent;
 
--- a/tests/macros_full_path.rs
+++ b/tests/macros_full_path.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "std")]
 #[test]
 fn test_create_map() {
     let _m = indexmap::indexmap! {
--- a/tests/quick.rs
+++ b/tests/quick.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "std")]
 use indexmap::{IndexMap, IndexSet};
 use itertools::Itertools;
 
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "std")]
 use indexmap::{indexmap, indexset};
 
 #[test]
--- a/src/rayon/map.rs
+++ b/src/rayon/map.rs
@@ -594,7 +594,7 @@ where
     }
 }
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
     use super::*;
     use std::string::String;
--- a/src/rayon/set.rs
+++ b/src/rayon/set.rs
@@ -630,7 +630,7 @@ where
     }
 }
 
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
 mod tests {
     use super::*;