File: fix-tests-randtest-feature-only.patch

package info (click to toggle)
rust-ordered-float 4.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 328 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 703 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
Index: ordered-float/src/lib.rs
===================================================================
--- ordered-float.orig/src/lib.rs
+++ ordered-float/src/lib.rs
@@ -2511,6 +2511,7 @@ mod impl_rand {
     mod tests {
         use super::*;
 
+        #[cfg(feature = "std")]
         fn sample_fuzz<T>()
         where
             Standard: Distribution<NotNan<T>>,
@@ -2534,11 +2535,13 @@ mod impl_rand {
         }
 
         #[test]
+        #[cfg(feature = "std")]
         fn sampling_f32_does_not_panic() {
             sample_fuzz::<f32>();
         }
 
         #[test]
+        #[cfg(feature = "std")]
         fn sampling_f64_does_not_panic() {
             sample_fuzz::<f64>();
         }