num: implement CheckedDiv
Remove unnecessary return
std::at_vec: add benchmarks
librustc: Allow vector repeat exprs in statics.
Add RngUtils::sample() method for reservoir sampling from iterators
Remove unused automatic cfg bindings Fixes #7169
Add test for repeat expr in statics.
Add a bunch of tests for closed issues

Closes #3907
Closes #5493
Closes #4464
Closes #4759
Closes #5666
Closes #5884
Closes #5926
Closes #6318
Closes #6557
Closes #6898
Closes #6919
Closes #7222
rustc: allow @ as-patterns to move when the sub-pattern contains no bindings.

A pattern like `foo @ Foo(Bar(*), _)` should be legal, even if `foo` moves,
since the subpatterns are purely structural.

Fixes #3761.
std: Move the iterator param on FromIterator and Extendable to the method.

If they are on the trait then it is extremely annoying to use them as
generic parameters to a function, e.g. with the iterator param on the trait
itself, if one was to pass an Extendable<int> to a function that filled it
either from a Range or a Map<VecIterator>, one needs to write something
like:

    fn foo<E: Extendable<int, Range<int>> +
              Extendable<int, Map<&'self int, int, VecIterator<int>>>
          (e: &mut E, ...) { ... }

since using a generic, i.e. `foo<E: Extendable<int, I>, I: Iterator<int>>`
means that `foo` takes 2 type parameters, and the caller has to specify them
(which doesn't work anyway, as they'll mismatch with the iterators used in
`foo` itself).

This patch changes it to:

    fn foo<E: Extendable<int>>(e: &mut E, ...) { ... }
Rewrite Saturating in terms of CheckedAdd/CheckedSub
rustc: Eliminate a derived error in check::_match
std: Change ProcessOptions struct to have an option of a ~ vector

This is a workaround for #8498
testsuite: Add xfailed test for #8498
std: Change either::{lefts, rights} to return an iterator
Update either::partition

Remove the only use of either::partition since it was better
accomplished with vector methods.

Update either::partition so that it sizes the vectors correctly before
it starts.
std: Replace map_vec, map_vec2, iter_vec2 in std::result

Replace these with three functions based on iterators: collect, fold,
and fold_. The mapping part is replaced by iterator .map(), so the part
that these functions do is to accumulate the final Result<,> value.

* `result::collect` gathers `Iterator<Result<V, U>>` to `Result<~[V], U>`
* `result::fold` folds `Iterator<Result<T, E>>` to `Result<V, E>`
* `result::fold_` folds `Iterator<Result<T, E>>` to `Result<(), E>`
Merge pull request #8479 from catamorphism/derived-errors

rustc: Eliminate a derived error in check::_match
auto merge of #8480 : cmr/rust/tutorial, r=metajack
register new snapshots