libstd: Change `slice_shift_char`, `shift_char`, `pop_char`, `shift_byte` and `pop_byte` to return an Option instead of failing
libstd: Add unit tests for `slice_shift_char`
libstd: Update docs for `slice_shift_char` and {shift,pop}_{char,byte}
fs: use an iterative algorithm for 'mkdir_recursive'

as requested in #6109
fs: use an iterative algorithm for 'rmdir_recursive'

For now, the windows version uses stat, just as before.
We should switch back to lstat as soon as #12795 is closed.
fs: units tests for mkdir_recusive and rmdir_recursive

The rmdir test is blocked by #12795 on windows.
debuginfo: Improve commandline option handling for debuginfo (fixes #12811)

The `-g` flag does not take an argument anymore while the argument to `--debuginfo` becomes mandatory. This change makes it possible again to run the compiler like this:

`rustc -g ./file.rs`

This did not work before because `./file.rs` was misinterpreted as the argument to `-g`. In order to get limited debuginfo, one now has to use `--debuginfo=1`.
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.
Remove the dependence of std::io::test on rand.

This replaces it with a manual "task rng" using XorShift and a crappy
seeding mechanism. Theoretically good enough for the purposes
though (unique for tests).
Update users for the std::rand -> librand move.
rand: deprecate `rng`.

This should be called far less than it is because it does expensive OS
interactions and seeding of the internal RNG, `task_rng` amortises this
cost. The main problem is the name is so short and suggestive.

The direct equivalent is `StdRng::new`, which does precisely the same
thing.

The deprecation will make migrating away from the function easier.
syntax: Add support for trait bounds on procs

This is needed to make progress on #10296 as the default bounds will no longer
include Send. I believe that this was the originally intended syntax for procs,
and it just hasn't been necessary up until now.
auto merge of #12650 : huonw/rust/librand, r=alexcrichton

Move std::rand to a separate rand crate

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.

Also, deprecates/removes `rand::rng` (this time using `#[deprecated]`), since it's too easy to accidentally use inside a loop, making things very slow (have to read randomness from the OS and seed the RNG each time.)
auto merge of #12774 : alexcrichton/rust/proc-bounds, r=pcwalton

This is needed to make progress on #10296 as the default bounds will no longer
include Send. I believe that this was the originally intended syntax for procs,
and it just hasn't been necessary up until now.
Bundle libbacktrace with the compiler

This will soon be used to print backtraces on failure
Port partition method from ~[T] to Vec<T>, for use early-late lifetime code.
Alpha-rename `.ident` fields of type `Name` to `.name`.
test: Relax a debuginfo test

This test is blocking a snapshot. Apparently the snapshot bot doesn't print
'limited-debuginfo::main()' but rather just 'main()'. Who knew?
alpha-rename .ident to .name in Lifetime, including in rustdoc.
Introduce Scope<'a> shorthand for &'a ScopeChain<'a>.