Skip to content

Commit b6212c9

Browse files
committed
[fix-ci-nightly] include Float / FloatCore for non-std builds for float_sampler
1 parent 6a958db commit b6212c9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

proptest/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ version = "1.2"
6868
optional = true
6969

7070
[dependencies.num-traits]
71-
version = "0.2.2"
71+
version = "0.2.15"
7272
default-features = false
73+
# std or libm required for mul_add.
74+
features = ["libm"]
7375

7476
[dependencies.quick-error]
7577
version = "2.0.0"

proptest/src/num/float_samplers.rs

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ macro_rules! float_sampler {
2121
use rand::distributions::uniform::{
2222
SampleBorrow, SampleUniform, Uniform, UniformSampler,
2323
};
24+
#[cfg(not(feature = "std"))]
25+
use num_traits::float::FloatCore;
26+
#[cfg(not(feature = "std"))]
27+
use num_traits::float::Float;
2428

2529
#[must_use]
2630
// Returns the previous float value. In other words the greatest value representable

0 commit comments

Comments
 (0)