vec: make the move iterator fast for all types

Closes #10976
auto merge of #10995 : thestinger/rust/fast_move_iter, r=huonw

Closes #10976

Taken from https://github.com/thestinger/rust-core/commit/863fbaaa125f1bb290e28cbf22236406cf0aebcf, so it will be easily updated to the better vector representation too.
std::vec: remove aliasing &mut [] and &[] from shift_opt.

Also, dramatically simplify it with some tasteful raw pointers, rather
than treating everything as a nail with `transmute`.
auto merge of #10966 : michaelwoerister/rust/prelude2, r=cmr

This PR improves the stepping experience in GDB. It contains some fine tuning of line information and makes *rustc* produce nearly the same IR/DWARF as Clang. The focus of the changes is function prologue handling which has caused some problems in the past (https://github.com/mozilla/rust/issues/9641).

It seems that GDB does not properly handle function prologues when the function uses segmented stacks, i.e. it does not recognize that the `__morestack` check is part of the prologue. When setting a breakpoint like `break foo` it will set the break point before the arguments of `foo()` have been loaded and still contain bogus values. For function with the #[no_split_stack] attribute this problem has never occurred for me so I'm pretty sure that segmented stacks are the cause of the problem. @jdm mentioned that segmented stack won't be completely abandoned after all. I'd be grateful if you could tell me about what the future might bring in this regard (@brson, @cmr).

Anyway, this PR should alleviate this problem at least in the case when setting breakpoints using line numbers and also make it less confusing when setting them via function names because then GDB will break *before* the first statement where one could conceivably argue that arguments need not be initialized yet.

Also, a koala: :koala:

Cheers,
Michael
vec: avoid some unsafe code in MoveIterator's dtor
Update and un-xfail auto-encode test

Closes #6122
Spell out the units used for the `offset` argument, so that people do
not try to scale to units of bytes themselves.
auto merge of #11000 : cmr/rust/auto_encode, r=alexcrichton

Closes #6122
Remove obsolete mutability from ast::Ty
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.
auto merge of #11002 : pnkfelix/rust/fsk-improve-doc-for-ptr-offset, r=alexcrichton

Spell out the units used for the `offset` argument, so that people do not try to scale to units of bytes themselves.
Detect stability attributes on methods.

If it's a trait method, this checks the stability attribute of the
method inside the trait definition. Otherwise, it checks the method
implementation itself.
std::vec::raw: convert init_elem to a method.
std::vec::raw: convert copy_memory to a method.
std::vec::bytes: remove the reference to overlapping src and dest in
docs for copy_memory.

&mut [u8] and &[u8] really shouldn't be overlapping at all (part of the
uniqueness/aliasing guarantee of &mut), so no point in encouraging it.
std::vec: convert .copy_memory to use copy_nonoverlapping_memory.

It is required that &mut[]s are disjoint from all other &(mut)[]s, so
this assumption is ok.
std::vec: make init_elem nicer by doing fewer moves.
Check even more live Path nodes in dead-code pass
provide an error at  at configure time if gcc, and g++ point to a mixture of clang and gcc. Fixes issue #10959

Signed-off-by: Carter Tazio Schonwald <carter.schonwald@gmail.com>
Rewrite std::comm

* Streams are now ~3x faster than before (fewer allocations and more optimized)
    * Based on a single-producer single-consumer lock-free queue that doesn't
      always have to allocate on every send.
    * Blocking via mutexes/cond vars outside the runtime
* Streams work in/out of the runtime seamlessly
* Select now works in/out of the runtime seamlessly
* Streams will now fail!() on send() if the other end has hung up
    * try_send() will not fail
* PortOne/ChanOne removed
* SharedPort removed
* MegaPipe removed
* Generic select removed (only one kind of port now)
* API redesign
    * try_recv == never block
    * recv_opt == block, don't fail
    * iter() == Iterator<T> for Port<T>
    * removed peek
    * Type::new
* Removed rt::comm