summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-09 18:04:42 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-14 10:14:11 -0700
commit0516c4099e68cfce267562c4460dc9a47be6776e (patch)
tree818431fee3012f79b1df6b8d02dda8c1b76082a1 /src/libstd
parent359ab0b56bd64f092321d3de01b905fd654ca054 (diff)
downloadrust-0516c4099e68cfce267562c4460dc9a47be6776e.tar.gz
rust-0516c4099e68cfce267562c4460dc9a47be6776e.zip
std: Reexport some unstable rand functionality for now
Needed to get modules like rustc_back::tempdir compiling.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 23776ecbc6e..d613fbe4d42 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -280,6 +280,17 @@ pub mod rt;
 mod panicking;
 mod rand;
 
+// Some external utilities of the standard library rely on randomness (aka
+// rustc_back::TempDir and tests) and need a way to get at the OS rng we've got
+// here. This module is not at all intended for stabilization as-is, however,
+// but it may be stabilized long-term. As a result we're exposing a hidden,
+// unstable module so we can get our build working.
+#[doc(hidden)]
+#[unstable(feature = "rand")]
+pub mod __rand {
+    pub use rand::{thread_rng, Rng};
+}
+
 // Modules that exist purely to document + host impl docs for primitive types
 
 mod array;