rand_distr/std_math: add note regarding other dependents (#1421)

This commit is contained in:
Diggory Hardy 2024-04-10 15:45:58 +01:00 committed by GitHub
parent bca078e929
commit eae3228c63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,12 @@ rustdoc-args = ["--generate-link-to-definition"]
default = ["std"]
std = ["alloc", "rand/std"]
alloc = ["rand/alloc"]
# Use std's floating-point arithmetic instead of libm.
# Note that any other crate depending on `num-traits`'s `std`
# feature (default-enabled) will have the same effect.
std_math = ["num-traits/std"]
serde1 = ["serde", "rand/serde1"]
[dependencies]

View File

@ -25,7 +25,8 @@ The floating point functions from `num_traits` and `libm` are used to support
`no_std` environments and ensure reproducibility. If the floating point
functions from `std` are preferred, which may provide better accuracy and
performance but may produce different random values, the `std_math` feature
can be enabled.
can be enabled. (Note that any other crate depending on `num-traits` with the
`std` feature (default-enabled) will have the same effect.)
## Crate features