Make sync::raw::Sem use Unsafe to manage mutability instead of transmuting an unsafe pointer
auto merge of #14708 : gereeter/rust/faster-sem, r=alexcrichton

Currently, `Sem`, which is used as a building block for all the blocking primitives, uses a very ugly hack to implement `Share` and be able to mutate the stored `WaitQueue` by hiding it all behind a `transmute`d `*()`. This PR replaces all that ugly machinery with `Unsafe`. Beyond being cleaner and not requiring `transmute`, this removes an allocation in the creation and removes an indirection for access.
Mention the specific kind of use in borrowck test function names

Some of the borrowck field-sensitivity test functions have 'use' in
their name, but they don't refer to the specific kind of use (whether a
copy or a deref). It would be better if the name more precisely
reflected what the function is testing.
Make borrowck test functions better match their names

A number of borrowck field-sensitivity tests perform more moves and
copies than their naming scheme would indicate. This is only necessary
for borrowed pointers (to ensure that the borrowws stay alive in the
near future when borrow liveness is tracked), but all other test
functions should be changed to match their name more closely.
Add more borrowck tests for functional update moves

Add more borrowck field-sensitivity tests for functional update moves.
This makes the collection of test functions more combinatorially
exhaustive.
Fix bad borrowck tests and move them from run-pass to compile-fail

The move_after_borrow / fu_move_after_borrow tests in
run-pass/borrowck-field-sensitivity.rs are not testing the right thing,
since the scope of the borrow is limited to the call to borrow(). When
fixed, these tests fail and thus should be moved to the corresponding
compile-fail test file.
Clean up borrows in borrowck field-sensitivity tests

Instead of calling a borrow() function that takes a pointer type, just
create a local pointer and dereference it. The dereference is there to
outsmart any future liveness analysis in borrowck.
Implement Show for DList
Implement ToSource and ToToken for ast::Arg

This makes ast::Arg usable in the quote_ macros.

Please note that this commit doesn't include a regression test. There
are tests that use the quote macros, but all of them are ignored. Due to
that, there is no obvious (to me) way to test this.

Since this change is absolutely trivial and only hooks up an additional
type to existing infrastructure (which presumably is tested elsewhere),
I concluded it's not worth the effort to follow up on this.
auto merge of #14717 : zwarich/rust/borrowck-tests, r=cmr

After sitting down to build on the work merged in #14318, I realized that some of the test names were not clear, others probably weren't testing the right thing, and they were also not as exhaustive as they could have been.
Implement Show for SmallIntMap
rustdoc: More selectively remove execute links

Closes #14723
auto merge of #14730 : alexcrichton/rust/issue-14723, r=cmr

Closes #14723
auto merge of #14722 : hannobraun/rust/quote-args, r=alexcrichton

The need for this came up while I worked on a procedural macro that parses an argument and adds the same argument to a generated function.
auto merge of #14725 : aochagavia/rust/show, r=alexcrichton
Fix PartialEq documentation with regards to floats

It is in fact the case that `NaN != NaN`. The true relations for
compareQuietNotEqual are LT, GT *and* UN.

I also rephrased the docs for PartialOrd since floats are not the only
types which are not totally ordered.
Clarify restrictions on ne

I can't think of any sane cases where this restriction would not hold,
and the standard library seems to assume it pretty much everywhere.
auto merge of #14733 : sfackler/rust/partial-eq-nan-docs, r=alexcrichton

It is in fact the case that `NaN != NaN`. The true relations for
compareQuietNotEqual are LT, GT *and* UN.

I also rephrased the docs for PartialOrd since floats are not the only
types which are not totally ordered.
sync: Move underneath libstd

This commit is the final step in the libstd facade, #13851. The purpose of this
commit is to move libsync underneath the standard library, behind the facade.
This will allow core primitives like channels, queues, and atomics to all live
in the same location.

There were a few notable changes and a few breaking changes as part of this
movement:

* The `Vec` and `String` types are reexported at the top level of libcollections
* The `unreachable!()` macro was copied to libcore
* The `std::rt::thread` module was moved to librustrt, but it is still
  reexported at the same location.
* The `std::comm` module was moved to libsync
* The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`.
  It is now a private module with types/functions being reexported under
  `sync::comm`. This is a breaking change for any existing users of duplex
  streams.
* All concurrent queues/deques were moved directly under libsync. They are also
  all marked with #![experimental] for now if they are public.
* The `task_pool` and `future` modules no longer live in libsync, but rather
  live under `std::sync`. They will forever live at this location, but they may
  move to libsync if the `std::task` module moves as well.

[breaking-change]