Correct span in privacy error
[collections] Adds `drain`: a way to sneak out the elements while clearing.

It is useful to move all the elements out of some collections without
deallocating the underlying buffer. It came up in IRC, and this patch
implements it as `drain`. This has been discussed as part of RFC 509.

r? @Gankro
cc: @frankmcsherry
Add privacy tests
Add RingBuf::as_slices as per collections reform v2.

See: https://github.com/rust-lang/rfcs/pull/509

Not sure if this is allowed to land before the RFC. Either way,
it's here for review.

r? @Gankro
cc: @bfops
rustc: Start "stabilizing" some flags

This commit shuffles around some CLI flags of the compiler to some more stable
locations with some renamings. The changes made were:

* The `-v` flag has been repurposes as the "verbose" flag. The version flag has
  been renamed to `-V`.
* The `-h` screen has been split into two parts. Most top-level options (not
  all) show with `-h`, and the remaining options (generally obscure) can be
  shown with `--help -v` which is a "verbose help screen"
* The `-V` flag (version flag now) has lost its argument as it is now requested
  with `rustc -vV` "verbose version".
* The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir`
  and `llvm-bc` to emphasize that they are LLVM's IR/bytecode.
* The `--emit` option has grown a new variant, `dep-info`, which subsumes the
  `--dep-info` CLI argument. The `--dep-info` flag is now deprecated.
* The `--parse-only`, `--no-trans`, and `--no-analysis` flags have
  moved behind the `-Z` family of flags.
* The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C`
  flag.
* The `--print-file-name` and `--print-crate-name` flags were moved behind one
  global `--print` flag which now accepts one of `crate-name`, `file-names`, or
  `sysroot`. This global `--print` flag is intended to serve as a mechanism for
  learning various metadata about the compiler itself.

No warnings are currently enabled to allow tools like Cargo to have time to
migrate to the new flags before spraying warnings to all users.
std: Second pass stabilization of Result<T, E>

This commit, like the second pass of `Option`, largely just stablizes the
existing functionality after renaming a few iterators.

The specific actions taken were:

* The `Ok` and `Err` variants were marked `#[stable]` as the stability
  inheritance was since removed.
* The `as_mut` method is now stable.
* The `map` method is now stable
* The `map_err` method is now stable
* The `iter`, `iter_mut`, and `into_iter` methods now returned structures named
  after the method of iteration. The methods are also now all stable.
* The `and_then` method is now stable.
* The `or_else` method is now stable.
* The `unwrap` family of functions are now all stable: `unwrap_or`,
  `unwrap_or_else`, `unwrap`, and `unwrap_err`.

There is a possible open extension to `Result::{and, and_then}` to make the
return type further generic over `FromError` (as proposed in #19078), but this
is a backwards compatible change due to the usage of default type parameters,
which makes the two functions safe to stabilize now regardless of the outcome of
that issue.
Add parser support for generalized where clauses

Implement support in the parser for generalized where clauses,
as well as the conversion of ast::WherePredicates to
ty::Predicate in `collect.rs`.
Add support for multiple region bounds in where clauses
patch up pretty-printing test
auto merge of #19900 : alexcrichton/rust/compiler-flags, r=cmr

This commit shuffles around some CLI flags of the compiler to some more stable
locations with some renamings. The changes made were:

* The `-v` flag has been repurposes as the "verbose" flag. The version flag has
  been renamed to `-V`.
* The `-h` screen has been split into two parts. Most top-level options (not
  all) show with `-h`, and the remaining options (generally obscure) can be
  shown with `--help -v` which is a "verbose help screen"
* The `-V` flag (version flag now) has lost its argument as it is now requested
  with `rustc -vV` "verbose version".
* The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir`
  and `llvm-bc` to emphasize that they are LLVM's IR/bytecode.
* The `--emit` option has grown a new variant, `dep-info`, which subsumes the
  `--dep-info` CLI argument. The `--dep-info` flag is now deprecated.
* The `--parse-only`, `--no-trans`, `--no-analysis`, and `--pretty` flags have
  moved behind the `-Z` family of flags.
* The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C`
  flag.
* The `--print-file-name` and `--print-crate-name` flags were moved behind one
  global `--print` flag which now accepts one of `crate-name`, `file-names`, or
  `sysroot`. This global `--print` flag is intended to serve as a mechanism for
  learning various metadata about the compiler itself.
* The top-level `--pretty` flag was moved to a number of `-Z` options.

No warnings are currently enabled to allow tools like Cargo to have time to
migrate to the new flags before spraying warnings to all users.

cc https://github.com/rust-lang/rust/issues/19051
auto merge of #20073 : nikomatsakis/rust/generalized-where-clause-parser, r=nikomatsakis

This is the same branch as #20002 but with the pretty-printing test fixed.
auto merge of #19903 : cgaebel/rust/ringbuf-as-slice, r=Gankro

See: https://github.com/rust-lang/rfcs/pull/509

Not sure if this is allowed to land before the RFC. Either way,
it's here for review.

r? @Gankro
cc: @bfops
auto merge of #19946 : cgaebel/rust/hashmap-drain-iter, r=gankro

It is useful to move all the elements out of a hashmap without deallocating
the underlying buffer. It came up in IRC, and this patch implements it as
`drain`.

r? @Gankro
cc: @frankmcsherry
auto merge of #19953 : sanxiyn/rust/privacy-span, r=alexcrichton

Fix #19062.
auto merge of #19961 : alexcrichton/rust/second-pass-result, r=aturon

This commit, like the second pass of `Option`, largely just stablizes the
existing functionality after renaming a few iterators.

The specific actions taken were:

* The `Ok` and `Err` variants were marked `#[stable]` as the stability
  inheritance was since removed.
* The `as_mut` method is now stable.
* The `map` method is now stable
* The `map_err` method is now stable
* The `iter`, `iter_mut`, and `into_iter` methods now returned structures named
  after the method of iteration. The methods are also now all stable.
* The `and_then` method is now stable.
* The `or_else` method is now stable.
* The `unwrap` family of functions are now all stable: `unwrap_or`,
  `unwrap_or_else`, `unwrap`, and `unwrap_err`.

There is a possible open extension to `Result::{and, and_then}` to make the
return type further generic over `FromError` (as proposed in #19078), but this
is a backwards compatible change due to the usage of default type parameters,
which makes the two functions safe to stabilize now regardless of the outcome of
that issue.