rust/src/libsyntax/ext
bors 81c022317a auto merge of #14427 : alexcrichton/rust/librand, r=huonw
This commit shuffles around some of the `rand` code, along with some
reorganization. The new state of the world is as follows:

* The librand crate now only depends on libcore. This interface is experimental.
* The standard library has a new module, `std::rand`. This interface will
  eventually become stable.

Unfortunately, this entailed more of a breaking change than just shuffling some
names around. The following breaking changes were made to the rand library:

* Rng::gen_vec() was removed. This has been replaced with Rng::gen_iter() which
  will return an infinite stream of random values. Previous behavior can be
  regained with `rng.gen_iter().take(n).collect()`

* Rng::gen_ascii_str() was removed. This has been replaced with
  Rng::gen_ascii_chars() which will return an infinite stream of random ascii
  characters. Similarly to gen_iter(), previous behavior can be emulated with
  `rng.gen_ascii_chars().take(n).collect()`

* {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all
  relied on being able to use an OSRng for seeding, but this is no longer
  available in librand (where these types are defined). To retain the same
  functionality, these types now implement the `Rand` trait so they can be
  generated with a random seed from another random number generator. This allows
  the stdlib to use an OSRng to create seeded instances of these RNGs.

* Rand implementations for `Box<T>` and `@T` were removed. These seemed to be
  pretty rare in the codebase, and it allows for libcore to not depend on
  liballoc.  Additionally, other pointer types like Rc<T> and Arc<T> were not
  supported.  If this is undesirable, librand can depend on liballoc and regain
  these implementations.

* The WeightedChoice structure is no longer built with a `Vec<Weighted<T>>`,
   but rather a `&mut [Weighted<T>]`. This means that the WeightedChoice
   structure now has a lifetime associated with it.

cc #13851

[breaking-change]
2014-05-29 16:41:42 -07:00
..
deriving auto merge of #14427 : alexcrichton/rust/librand, r=huonw 2014-05-29 16:41:42 -07:00
tt Add patterns to MacResult 2014-05-28 12:42:21 -07:00
asm.rs std: Remove String's to_owned 2014-05-27 11:11:15 -07:00
base.rs Add patterns to MacResult 2014-05-28 12:42:21 -07:00
build.rs syntax: Add a source field to Local for tracking if it comes from lets or fors. 2014-05-26 22:44:38 +10:00
bytes.rs Make bytes!() return 'static 2014-05-18 13:03:38 -07:00
cfg.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
concat.rs core: rename strbuf::StrBuf to string::String 2014-05-24 21:48:10 -07:00
concat_idents.rs core: rename strbuf::StrBuf to string::String 2014-05-24 21:48:10 -07:00
env.rs libstd: Remove ~str from all libstd modules except fmt and str. 2014-05-22 14:42:01 -07:00
expand.rs Expand macros in patterns 2014-05-28 12:42:21 -07:00
fmt.rs Change static.rust-lang.org to doc.rust-lang.org 2014-05-21 19:55:39 -07:00
format.rs std: Remove format_strbuf!() 2014-05-28 08:35:41 -07:00
log_syntax.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
mtwt.rs std: Modernize the local_data api 2014-05-07 23:43:39 -07:00
quote.rs std: Rename strbuf operations to string 2014-05-27 12:59:31 -07:00
registrar.rs rustc: Don't link in syntax extensions 2014-04-13 11:29:28 -07:00
source_util.rs std: Rename strbuf operations to string 2014-05-27 12:59:31 -07:00
trace_macros.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00