Make BufferedReader propagate 0-byte long reads.

Could prevent callers from catching the situation and lead to e.g early
iterator terminations (cf. `Reader::read_byte') since `None' is only to
be returned only on EOF.
Fix #10755 - ICE: `--linker=`

Trap the io_error condition so that a more informative error message is
displayed when the linker program cannot be started, such as when the
name of the linker binary is accidentally mistyped.

closes #10755
std: silence warnings when compiling test.
extra: silence warnings during testing.
Remove many false positives from the ctags results

Anchoring the keyword as the first non-whitespace on a line may mean
that the occasional genuine-but-unconventionally-formatted tag is
missed, but it avoids a large number of false positives.

I changed the type descriptive texts about a bit too. That part's purely
cosmetic.

I also changed the ignored file list to use a filename matching the make
rule, `TAGS.vi` instead of `TAGS.vim`.
rustc: Handle `#[link(name = "")]` error
mklldeps.py: Ignore extra whitespaces of argument
Accept trailing commas in struct patterns

We decided in the 12/10/13 weekly meeting that trailing commas should be
accepted pretty much anywhere. They are currently not allowed in struct
patterns, and this commit adds support for that.

Closes #10392
auto merge of #11072 : chris-morgan/rust/ctags-tweaks, r=cmr

Anchoring the keyword as the first non-whitespace on a line may mean
that the occasional genuine-but-unconventionally-formatted tag is
missed, but it avoids a large number of false positives.

I changed the type descriptive texts about a bit too. That part's purely
cosmetic.

I also changed the ignored file list to use a filename matching the make
rule, `TAGS.vi` instead of `TAGS.vim`.
librustc: Add missing case for the `Pod` bound in `tydecode`.
Fix two regressions introduced by #11072.

There, concrete evidence that I shouldn't try doing such things at 1:30am.
auto merge of #11060 : pcwalton/rust/tydecode-pod, r=pcwalton

r? @brson
Get comm_adapters building again

I accidentally removed this module from compilation awhile back, this adds it
back in.

Closes #11076
Purge @-boxes from the reading half of EBML

Now that the metadata is an owned value with a lifetime of a borrowed byte
slice, it's possible to have future optimizations where the metadata doesn't
need to be copied around (very expensive operation).
auto merge of #11057 : alexcrichton/rust/no-at-in-ebml, r=pcwalton

Now that the metadata is an owned value with a lifetime of a borrowed byte
slice, it's possible to have future optimizations where the metadata doesn't
need to be copied around (very expensive operation).
std::vec: implement a stable merge sort, deferring to insertion sort for
very small runs.

This uses a lot of unsafe code for speed, otherwise we would be having
to sort by sorting lists of indices and then do a pile of swaps to put
everything in the correct place.

Fixes #9819.
extra: remove sort in favour of the std method.

Fixes #9676.
auto merge of #11071 : huonw/rust/quiet-test, r=cmr
auto merge of #11073 : klutzy/rust/issue-10978, r=alexcrichton

This patchset fixes small glitches which caused #10978.
rustc: Optimize reading metadata by 4x

We were previously reading metadata via `ar p`, but as learned from rustdoc
awhile back, spawning a process to do something is pretty slow. Turns out LLVM
has an Archive class to read archives, but it cannot write archives.

This commits adds bindings to the read-only version of the LLVM archive class
(with a new type that only has a read() method), and then it uses this class
when reading the metadata out of rlibs. When you put this in tandem of not
compressing the metadata, reading the metadata is 4x faster than it used to be
The timings I got for reading metadata from the respective libraries was:

    libstd-04ff901e-0.9-pre.dylib    => 100ms
    libstd-04ff901e-0.9-pre.rlib     => 23ms
    librustuv-7945354c-0.9-pre.dylib => 4ms
    librustuv-7945354c-0.9-pre.rlib  => 1ms
    librustc-5b94a16f-0.9-pre.dylib  => 87ms
    librustc-5b94a16f-0.9-pre.rlib   => 35ms
    libextra-a6ebb16f-0.9-pre.dylib  => 63ms
    libextra-a6ebb16f-0.9-pre.rlib   => 15ms
    libsyntax-2e4c0458-0.9-pre.dylib => 86ms
    libsyntax-2e4c0458-0.9-pre.rlib  => 22ms

In order to always take advantage of these faster metadata read-times, I sort
the files in filesearch based on whether they have an rlib extension or not
(prefer all rlib files first).

Overall, this halved the compile time for a `fn main() {}` crate from 0.185s to
0.095s on my system (when preferring dynamic linking). Reading metadata is still
the slowest pass of the compiler at 0.035s, but it's getting pretty close to
linking at 0.021s! The next best optimization is to just not copy the metadata
from LLVM because that's the most expensive part of reading metadata right now.