rollup merge of #19534: scialex/liballoc-cfg

Adds the ability to use a custom allocator heap by passing either --cfg
external_crate and --extern external=<allocator_crate_name> or --cfg
external_funcs and defining the allocator functions prefixed by 'rust_'
somewhere.

This is useful for many applications including OS/embedded development,
and allocator development and testing.
rollup merge of #19553: sfackler/issue-19543

Closes #19543
Implement BitOps for TrieSet
libcore: Fix `Sized` bounds on overloaded function traits.

- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes
  `self` by value and can never be implemented by an unsized type.
- Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl,
  as both `Fn` and `FnMut` are `for Sized?`.
librustc: Don't reuse same alloca for match on struct/tuple field which we reassign to in match body.
Merge remote-tracking branch 'csouth3/trieset-bitops' into rollup-2014_12_03

Conflicts:
	src/libcollections/trie/set.rs
collections: dramatically speed up Vec::reserve with magic

Somehow llvm is able to optimize this version of Vec::reserve
into dramatically faster than the old version. In micro-benchmarks
this was 2-10 times faster. It also shaved 14 minutes off of
rust's compile times.

Closes #19281.
auto merge of #19508 : cmr/rust/rollup-2014_12_03, r=cmr
Add doctests for keys() and values() of the BTreeMap collection.

Update keys() and values() for BTreeMap based on @Gankro's comments.

Assign keys and values to variables before doing assertion.
fix 404
work around portability issue on FreeBSD, in which the key returned from
pthread_key_create can be 0.
Add doctests for union, diff, sym_diff, and intersection.

Add a rustdoc test for union to exhibit how it is used.

There is already a test for union in the test namespace, but this commit
adds a doctest that will appear in the rustdocs.

Add a doctest for the difference function.

Add a doctest for the symmetric_difference function.

Add a doctest for the intersection function.

Update the union et al. doctests based on @Gankro's comments.

Make the union et al. doctests a bit more readable.
Utilize fewer reexports

In regards to:

https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729

This commit:

* Changes the #deriving code so that it generates code that utilizes fewer
  reexports (in particur Option::* and Result::*), which is necessary to
  remove those reexports in the future
* Changes other areas of the codebase so that fewer reexports are utilized
Register new snapshots
prefer "FIXME" to "TODO".
librustc: Fix debuginfo for captured variables in non-FnOnce unboxed closures.
Implement BitOps for TreeSet
Correct minor typos on the ownership guide.

liftimes -> lifetimes
Typo
Feature-gate explicit unboxed closure method calls & manual impls,
detect UFCS drop and allow UFCS methods to have explicit type parameters.

Work towards #18875.

Since code could previously call the methods & implement the traits
manually, this is a

[breaking-change]

Closes #19586. Closes #19375.