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
Fix two regressions introduced by #11072.

There, concrete evidence that I shouldn't try doing such things at 1:30am.
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.
Support ANSI colors in msys terminals. See #2807
std::vec: add a sugary .sort() method for plain Ord sorting.

This moves the custom sorting to `.sort_by`.
auto merge of #11031 : jhasse/rust/patch-msys-3, r=cmr

Enable ANSI colors if TERM is set to cygwin and terminfo is not available (msys terminal on Windows). See #2807
mk: Work around problem with run-make tests on multiple targets. #11094
mk: Remove obsolete source reformatting rules
auto merge of #11079 : chris-morgan/rust/fix-11072-regressions, r=brson

(#11072)

There, concrete evidence that I shouldn't try doing such things at 1:30am.
auto merge of #10930 : DaGenix/rust/remove-unnecessary-fields, r=alexcrichton

3 minor clean-ups now that #9629 is fixed:

* Update MutChunkIter to remove the ```remainder``` that existed just to allow the size_hint() method to be implemented. This is no longer necessary since we can just access the length of the slice directly.
* Update MutSplitIterator to address the FIXME in its size_hint() method. This method was only partially implemented due to the issue. Also, implement a minor optimization in the case that its the last iteration.
* Update ByRef iterator to implement the size_hint() method.

I noticed that MutSplitIterator returns an empty slice if called on an empty slice. I don't know if this is intended or not, but I left the ```finished``` field in-place to preserve this behavior.

@TeXitoi @blake2-ppc
rustuv: Stop link to pthread on Windows
auto merge of #11100 : klutzy/rust/win-no-pthread-2, r=alexcrichton
Remove unnecessary semicolon
std: Remove some @-boxes
auto merge of #11095 : brson/rust/issue-11094, r=alexcrichton
Don't poison ARCs that are used while unwinding

Closes #11097
Remove unneccessary mut from arc
Attempt to fix the segfaulting osx bots

Upon inspecting the core dumps, they're all segfaulting at the same instruction
with the same value in a register that looks fishy. It appears to be indexing
into an array with a -1 index and then getting some weird overflow and dying.

I have attempted to fix this as part of
alexcrichton/libuv@fd5308383c575472edb2163d823dc6670bf59609,
but I am unsure of whether this is the actual cause of the problem, so I am not
going to upstream it just yet. I have a fairly high confidence that this is
indeed the problem, but I want to make sure that the bots to segfault all over
the place before upstreaming.