diff --git a/Cargo.toml b/Cargo.toml index 1255bf8bd6..96b6241771 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ default = ["libc"] no_std = [] box = [] # enable use of Box on no_std, requires alloc crate and feature vec = [] # enable use of Vec on no_std, requires collections crate and feature -rdrand = [] +rdrand = [] # with no_std, requires core_io [dev-dependencies] log = "0.3.0" diff --git a/src/lib.rs b/src/lib.rs index 1713a106c9..647a3f1e47 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -253,6 +253,9 @@ #[cfg(feature="box")] extern crate alloc; #[cfg(feature="vec")] extern crate collections; +#[cfg(all(feature="no_std",feature="rdrand",not(feature="core_io")))] +use using::rdrand::feature::with::no_std::feature::requires::core_io::feature; + #[cfg(all(not(feature="no_std"),not(feature="rdrand")))] use core::cell::RefCell; use core::marker; use core::mem;