Skip to content

Commit

Permalink
Fix alloc feature in rand-core
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Mar 8, 2018
1 parent 8412b9e commit 2e6dded
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default = ["std"]
nightly = ["i128_support"] # enables all features requiring nightly rust

std = ["rand-core/std", "winapi", "libc"] # default feature; without this rand uses libcore
alloc = [] # enables Vec and Box support without std
alloc = ["rand-core/alloc"] # enables Vec and Box support without std

i128_support = [] # enables i128 and u128 support

Expand Down
1 change: 1 addition & 0 deletions rand-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#![deny(missing_debug_implementations)]

#![cfg_attr(not(feature="std"), no_std)]
#![cfg_attr(all(feature="alloc", not(feature="std")), feature(alloc))]

#[cfg(feature="std")] extern crate core;
#[cfg(all(feature = "alloc", not(feature="std")))] extern crate alloc;
Expand Down

0 comments on commit 2e6dded

Please sign in to comment.