Add [mut_]shift_ref/[mut_]pop_ref functions, which return a pointer to the first/last item in the slice and modify the slice to exclude the returned item. Useful when writing iterators over mutable references.
Remove enum struct return workaround from LLVM bindings.
std::ascii:  Fix is_digit() and is_control()

is_digit() incorrectly returned false for '0'.
is_control() incorrectly returned true for ' ' (space).
Add an iterator for receiving messages from GenericPorts
Clean up statically initialized data on shutdown

Whenever the runtime is shut down, add a few hooks to clean up some of the
statically initialized data of the runtime. Note that this is an unsafe
operation because there's no guarantee on behalf of the runtime that there's no
other code running which is using the runtime.

This helps turn down the noise a bit in the valgrind output related to
statically initialized mutexes. It doesn't turn the noise down to 0 because
there are still statically initialized mutexes in dynamic_lib and
os::with_env_lock, but I believe that it would be easy enough to add exceptions
for those cases and I don't think that it's the runtime's job to go and clean up
that data.
Add benchmark tests to path/posix

I have written some benchmark tests to `push`, `push_many`, `join`,
`join_many` and `ends_with_path`.
auto merge of #10688 : bjz/rust/recv_iter, r=brson

I've noticed I use this pattern quite a bit:

~~~rust
do spawn {
    loop {
        match port.try_recv() {
            Some(x) => ...,
            None => ...,
        }
    }
}
~~~

The `RecvIterator`, returned from a default `recv_iter` method on the `GenericPort` trait, allows you to reduce this down to:

~~~rust
do spawn {
    for x in port.recv_iter() {
        ...
    }
}
~~~

As demonstrated in the tests, you can also access the port from within the `for` block for further `recv`ing and `peek`ing with no borrow errors, which is quite nice.
auto merge of #10684 : jld/rust/unstruct-unhack-typekind, r=alexcrichton
Freeze the AST by removing a couple of unused @mut ~[T] from token_tree.
std::ascii:  Add tests for is_digit() and is_control()
auto merge of #10693 : eddyb/rust/freeze-ast, r=thestinger

It's truly immutable now, which will allow us to remove some cloning in the parser and box parts of the AST in `Rc<T>` (if desired).
rustdoc: Use new ||/proc syntax
Improve the rt::thread module

* Added doc comments explaining what all public functionality does.
* Added the ability to spawn a detached thread
* Added the ability for the procs to return a value in 'join'
Relax restrictions on unknown feature directives

Instead of forcibly always aborting compilation, allow usage of
 #[warn(unknown_features)] and related lint attributes to selectively abort
 compilation. By default, this lint is deny.
auto merge of #10662 : alexcrichton/rust/thread-detach, r=pcwalton

This has one commit from a separate pull request (because these commits depend on that one), but otherwise the extra details can be found in the commit messages. The `rt::thread` module has been generally cleaned up for everyday safe usage (and it's a bug if it's not safe).
auto merge of #10685 : ebiggers/rust/ascii_fixes, r=alexcrichton

is_digit() incorrectly returned false for '0'.
is_control() incorrectly returned true for ' ' (space).
Use the native tls implementation on android

Turns out android doesn't support LLVM's thread_local attribute and accompanying
implementation.

Closes #10686
auto merge of #10680 : alexcrichton/rust/relax-feature-gate, r=thestinger

Instead of forcibly always aborting compilation, allow usage of
 #[warn(unknown_features)] and related lint attributes to selectively abort
 compilation. By default, this lint is deny.
Update unicode.py to reflect language changes
Update Unicode data to version 6.3