std::rand: remove the `fn main()` from the examples.
std::hashmap: add an example to mangle.
std: remove some test warnings
std: result::collect to take an iterator, add option::collect
librustc: Implement coercion for traits.
Add tests for trait object coercion.
std: uniform modules titles for doc

This commit uniforms the short title of modules provided by libstd,
in order to make their roles more explicit when glancing at the index.

Signed-off-by: Luca Bruno <lucab@debian.org>
Renamed ClonableIterator to CloneableIterator
auto merge of #11156 : luqmana/rust/trait-object-coercion, r=pcwalton

This ports over @pcwalton's old pull that bitrotted (#5597). Fixes #10039.

r? @pcwalton / @nikomatsakis
auto merge of #11098 : erickt/rust/collect, r=alexcrichton

This patch changes `result::collect` (and adds a new `option::collect`) from creating a `~[T]` to take an `Iterator`. This makes the function much more flexible, and may replace the need for #10989.

This patch is a little more complicated than it needs to be because of #11084. Once that is fixed we can replace the `CollectIterator` with a `Scan` iterator.

It also fixes a test warning.
Bring native process bindings up to date

Move the tests into libstd, use the `iotest!` macro to test both native and uv
bindings, and use the cloexec trick to figure out when the child process fails
in exec.
auto merge of #11160 : octurion/rust/cloneable, r=alexcrichton

Rename all instances of ClonableIterator to CloneableIterator. This fixes bug https://github.com/mozilla/rust/issues/11132.
Implement native TCP I/O
Initialize LLVM only once

This also appears to fix a race in LLVM that was causing a deadlock on the bots
during the doc-test tests (where we use rustc in parallel).
Update tutorial.md : rename pkgid to crate_id
auto merge of #11170 : alexcrichton/rust/fix-llvm-race, r=pcwalton

This also appears to fix a race in LLVM that was causing a deadlock on the bots
during the doc-test tests (where we use rustc in parallel).
rustc: Fix a borrow failure in `.ln_str()`

`ln_str` caused ICE if `RUST_LOG=rustc::middle::liveness` is given
due to borrow failure.
Add docs for more crates
auto merge of #11159 : alexcrichton/rust/native-io, r=pcwalton

The old `rtio-processes` run-pass test is now moved into libstd's `io::process` module, and all process and TCP tests are now run with `iotest!` (both a native and a green version are tested).

All TCP networking on windows is provided by `ws2_32` which is apparently very similar to unix networking (hurray!).
Update bundled gyp

Closes #11152