Add rustup.sh to the repo

Just to have it somewhere to point to. Updating it will not
automatically update the one on static.rust-lang.org.
Improved examples on Vec documentation

- shrink_to_fit example is now more clear by asserting the capacity value
Changes a little the description of take in the guide

Closes #18218
split platform definitions out of mk/platform.mk

The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
Guide: Closures: minor wording fixes
Guide: Closures fix suggested by @cakebaker
Untabify rustup.sh
Add @thestinger comment explaining that shrink_to_fit might drop down as close as possible but not to the minimun
DSTify [T]/str extension traits

This PR changes the signature of several methods from `foo(self, ...)` to
`foo(&self, ...)`/`foo(&mut self, ...)`, but there is no breakage of the usage
of these methods due to the autoref nature of `method.call()`s. This PR also
removes the lifetime parameter from some traits (`Trait<'a>` -> `Trait`). These
changes break any use of the extension traits for generic programming, but
those traits are not meant to be used for generic programming in the first
place. In the whole rust distribution there was only one misuse of a extension
trait as a bound, which got corrected (the bound was unnecessary and got
removed) as part of this PR.

[breaking-change]
Fix monomorphization of unboxed closures

This adds a `Substs` field to `ty_unboxed_closure` and plumbs basic
handling of it throughout the compiler. trans now correctly
monomorphizes captured free variables and llvm function defs.  This
fixes uses of unboxed closures which reference a free type or region
parameter from their environment in either their signature or free
variables.  Closes #16791
Add regression test for issue #16791
auto merge of #18144 : bkoropoff/rust/mighty-monomorphizin-unboxed-closures, r=nikomatsakis

This allows unboxed closures that reference free type/region parameters to be monomorphized correctly in trans.

It was necessary to make `ty_unboxed_closure` carry around a `Substs` to accomplish this.  Plumbing this through typeck revealed several areas where type/region parameters in unboxed closure types are possibly not being handled correctly.  Since my goal was just to fix trans, I decided to leave FIXME comments on areas that still need attention and seek feedback on the best way to clean them up, possibly as a follow-up PR.

Closes #16791
Use PascalCase for token variants
Convert some token  functions into methods
Use an enum rather than a bool in token::Ident
Move token-to-string functions into print::pprust
alloc: Make deriving more friendly with Arc

This adds impls of Eq/Ord/PartialEq/PartialOrd/Show/Default to Arc<T>, and it
also removes the `Send + Sync` bound on the `Clone` impl of Arc to make it more
deriving-friendly. The `Send + Sync` requirement is still enforce on
construction, of course!
auto merge of #18192 : jmesmon/rust/platform-generic, r=alexcrichton

The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
auto merge of #18127 : alexcrichton/rust/deriving-arc, r=aturon

This adds impls of Eq/Ord/PartialEq/PartialOrd/Show/Default to Arc<T>, and it
also removes the `Send + Sync` bound on the `Clone` impl of Arc to make it more
deriving-friendly. The `Send + Sync` requirement is still enforce on
construction, of course!
auto merge of #18254 : areski/rust/pr-fix-vec-doc-example, r=alexcrichton

- shrink_to_fit example is now more clear by asserting the capacity value
- annotation [0, mid) changed for [0, mid]