Guide: generics
Allow generic foreign functions.

Generic extern functions written in Rust have their names mangled, as well as their internal clownshoe __rust_abi functions. This allows e.g. specific monomorphizations of these functions to be used as callbacks.

Closes #12502.
Add new tests for extern and foreign fns and name mangling.
Fix typo in the tutorial
Use system rustc if configured with --enable-local-rust

This commit makes the configuration system autodetect a rustc that
is already installed and use that instead of downloading a snapshot.
fix grammar in Vec.retain's doc comment
Rename `Share` to `Sync`

This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use`
statement, but the `NoShare` struct is no longer part of `std::kinds::marker`
due to #12660 (the build cannot bootstrap otherwise).

All code referencing the `Share` trait should now reference the `Sync` trait,
and all code referencing the `NoShare` type should now reference the `NoSync`
type. The functionality and meaning of this trait have not changed, only the
naming.

Closes #16281
[breaking-change]
auto merge of #15831 : rpjohnst/rust/generic-foreign-fns, r=alexcrichton

This allows for things like this:

    extern "C" fn callback<T>(t: T) { /* ... */ }
    extern "C" {
        fn take_callback(c: extern fn(i32));
    }

and later:

    take_callback(callback::<i32>);

Closes #12502.
Guide: closures
auto merge of #16317 : adrienbrault/rust/patch-1, r=kballard
Guide: tasks
Remove spawn-stack-too-big.rs, which is too flaky.
auto merge of #16334 : nikomatsakis/rust/mission-snapshot, r=achrichto
Guide: Traits
auto merge of #16206 : steveklabnik/rust/guide_lambdas, r=brson
auto merge of #16273 : steveklabnik/rust/guide_generics, r=brson
Cleanup collections::slice documentation.

This does a few things:

 - remove references to ~[] and the OwnedVector trait, which are both
   obsolete
 - correct the docs to say that this is the slice module, not the vec
   module
 - add a sentence pointing out that vectors are distinct from Vec
 - remove documentation on Vec.

closes #15459
auto merge of #16285 : alexcrichton/rust/rename-share, r=huonw

This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use`
statement, but the `NoShare` struct is no longer part of `std::kinds::marker`
due to #12660 (the build cannot bootstrap otherwise).

All code referencing the `Share` trait should now reference the `Sync` trait,
and all code referencing the `NoShare` type should now reference the `NoSync`
type. The functionality and meaning of this trait have not changed, only the
naming.

Closes #16281
[breaking-change]
auto merge of #16279 : nham/rust/fix_slice_docs, r=alexcrichton

This does a few things:

 - remove references to ~[] and the OwnedVector trait, which are both
   obsolete
 - correct the docs to say that this is the slice module, not the vec
   module
 - add a sentence pointing out that vectors are distinct from Vec
 - remove documentation on Vec.

closes #15459
auto merge of #16309 : steveklabnik/rust/guide_tasks, r=brson

I wasn't 100% sure of what level of detail I wanted to go into things here. For example, 1:1 vs M:N tasks seems like a better distinction to leave to the Guide.