std: Move rand to librand.

This functionality is not super-core and so doesn't need to be included
in std. It's possible that std may need rand (it does a little bit now,
for io::test) in which case the functionality required could be moved to
a secret hidden module and reexposed by librand.

Unfortunately, using #[deprecated] here is hard: there's too much to
mock to make it feasible, since we have to ensure that programs still
typecheck to reach the linting phase.
This commit is contained in:
Huon Wilson 2014-03-02 11:23:04 +11:00
parent 74bfa7108a
commit 6fa4bbeed4
18 changed files with 161 additions and 198 deletions

View file

@ -10,9 +10,11 @@
// ensure that the TaskRng isn't/doesn't become accidentally sendable.
extern crate rand;
fn test_send<S: Send>() {}
pub fn main() {
test_send::<::std::rand::TaskRng>();
//~^ ERROR: incompatible type `std::rand::TaskRng`, which does not fulfill `Send`
test_send::<::rand::TaskRng>();
//~^ ERROR: incompatible type `rand::TaskRng`, which does not fulfill `Send`
}