-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rand_distr: fix no_std build #1208
Conversation
@@ -13,6 +13,8 @@ use crate::{Distribution, Uniform}; | |||
use rand::Rng; | |||
use core::fmt; | |||
use core::cmp::Ordering; | |||
#[allow(unused_imports)] | |||
use num_traits::Float; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The allow attributes is a bit unfortunate, but we currently don't have a way of checking whether std
is enabled for current build, note that it's not equivalent to checking feature = "std"
.
I believe we can add |
IIRC it's not true for Rust 1.36. |
In that case it sounds like the best thing to do is release a patch now to fix this, then bump the MSRV for |
@newpavlov I'm using it here, and it seems to work for Rust 1.36. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, I see nothing against releasing this patch version. There's nothing else worth mentioning in the changelog.
@dhardy I'll take care of the release tonight, unless you get to it before then. |
Published |
Closes #1205.
Note that the
test-no-std
job checks onlyrand
andrand_core
and does not affectrand_distr
and other crates . IIUC we need a virtual manifest for it to work, not the current repository structure.Changing working directory to
rand_distr
and runningcargo build
in it will not work due to the dev feature unification, i.e. we would needresolver = "2"
forno_std
tests to work in that case.