Adding show impl for Rc
Add next_permutation and prev_permutation onto MutableOrdVector<T>.

Unlike ImmutableClonableVector::permutations() which returns an iterator,
cloning the entire array each iteration, these methods mutate the vector in-place.
For that reason, these methods are much faster; between 35-55 times faster,
depending on the benchmark. They also generate permutations in lexicographical order.
auto merge of #14616 : forticulous/rust/rc-show, r=alexcrichton

Show impl for Rc
auto merge of #14623 : exscape/rust-fork/master, r=alexcrichton

Unlike ImmutableClonableVector::permutations() which returns an iterator,
cloning the entire array each iteration, these methods mutate the vector in-place.
For that reason, these methods are much faster; between 35-55 times faster,
depending on the benchmark. They also generate permutations in lexicographical order.
Move subst data structures into subst.rs, fix capitalization
Simplify MonoId not to include parameters which, given coherence, are purely derived
Move Def out of syntax crate, where it does not belong
Stop passing around Option<&substs> in trans and just pass &substs, making the code more regular
Add missing test case for contravariant trait matching
Fix resolve to not permit refs to type vars from outer fns
(Fixes #14603)
Introduce VecPerParamSpace and use it to represent sets of types and
parameters

This involves numerous substeps:

1. Treat Self same as any other parameter.
2. No longer compute offsets for method parameters.
3. Store all generic types (both trait/impl and method) with a method,
   eliminating odd discrepancies.
4. Stop doing unspeakable things to static methods and instead just use
   the natural types, now that we can easily add the type parameters from
   trait into the method's polytype.
5. No doubt some more. It was hard to separate these into distinct commits.

Fixes #13564
Temporarily add methods to treat a 3-tuple as a slice