librustc: Disallow mutation and assignment in pattern guards, and modify
the CFG for match statements.

There were two bugs in issue #14684. One was simply that the borrow
check didn't know about the correct CFG for match statements: the
pattern must be a predecessor of the guard. This disallows the bad
behavior if there are bindings in the pattern. But it isn't enough to
prevent the memory safety problem, because of wildcards; thus, this
patch introduces a more restrictive rule, which disallows assignments
and mutable borrows inside guards outright.

I discussed this with Niko and we decided this was the best plan of
action.

This breaks code that performs mutable borrows in pattern guards. Most
commonly, the code looks like this:

    impl Foo {
        fn f(&mut self, ...) {}
        fn g(&mut self, ...) {
            match bar {
                Baz if self.f(...) => { ... }
                _ => { ... }
            }
        }
    }

Change this code to not use a guard. For example:

    impl Foo {
        fn f(&mut self, ...) {}
        fn g(&mut self, ...) {
            match bar {
                Baz => {
                    if self.f(...) {
                        ...
                    } else {
                        ...
                    }
                }
                _ => { ... }
            }
        }
    }

Sometimes this can result in code duplication, but often it illustrates
a hidden memory safety problem.

Closes #14684.

[breaking-change]
doc: TreeSet methods and main example.
doc: TreeMap methods with examples.

Small corrections for TreeSet examples.
doc: Main example for TreeMap.
doc: Small rewording.
Implement Hash for tuples of up to arity 12. Also change the style to be consistent with core::tuple
Make test expansion induce less reachability

We previously reexported entire modules, which caused private things to
become reachable and trip the dead code and private items in public API
lints.

Closes #15912
Implement PartialOrd for TrieMap and TrieSet
Implement PartialOrd for SmallIntMap
Implement PartialOrd for Bitv and BitvSet
Implement Ord for TrieMap/TrieSet/SmallIntMap/Bitv/BitvSet
Omit unnecessary stack slots for ignored return values

If we have an immediate return value that doesn't need to be dropped, we
don't have to create a stack slot for it.
Emit lifetime end markers for allocas for ignored return values
rustdoc: improvements to stability dashboard

* Makes dashboard width dynamic.
* Colors unmarked items.
* Gives overall crate percentages.
Fix typo in getopts::getopts documentation, return Matches instead of Opt
Fix some of the documentation std::io::fs.
doc: reduce overlong sentence
auto merge of #16032 : treeman/rust/doc-treecollection, r=alexcrichton
auto merge of #16033 : nham/rust/hash_tuple_impl, r=alexcrichton

Previously the implementation of Hash was limited to tuples of up to arity 8. This increases it to tuples of up to arity 12. 

Also, the implementation macro for `Hash` used to expand to something like this:

    impl Hash for (a7,)
    impl Hash for (a6, a7)
    impl Hash for (a5, a6, a7)
    ...

This style is inconsistent with the implementations in core::tuple, which look like this:

    impl Trait for (A,)
    impl Trait for (A, B)
    impl Trait for (A, B, C)
    ...

This is perhaps a minor point, but it does mean the documentation pages are inconsistent. Compare the tuple implementations in the documentation for [Hash](http://static.rust-lang.org/doc/master/std/hash/trait.Hash.html) and [PartialOrd](http://static.rust-lang.org/doc/master/core/cmp/trait.PartialOrd.html)

This changes the Hash implementation to be consistent with `core::tuple`.
auto merge of #16034 : sfackler/rust/test-reexport-fix, r=alexcrichton

We previously reexported entire modules, which caused private things to
become reachable and trip the dead code and private items in public API
lints.

Closes #15912