Add support for trailing commas in more places

This lets the parser understand trailing commas in method calls, method
definitions, enum variants, and type parameters.

Closes #14240.
Closes #15887.
Log linker stderr and stdout.
Fix const evaluation of cast expression from bool
Adjust the error messages to match the pattern "expected foo, found bar"

Closes #8492
libcore: Simplify Enumerate, Zip::next_back

Use ExactSize::len() and defer to its decisions about overly defensive
assertions. Remove the length double-check and simply put a failure
case if the Zip finds an uneven end in .next_back().

Fixing this up since I think I wrote this, and it's been known to
confuse rusties (PR#15886).
doc: fix some typos in the Guide
auto merge of #16730 : tshepang/rust/typos, r=pcwalton
auto merge of #16728 : bluss/rust/zip-next-back, r=alexcrichton

Use ExactSize::len() and defer to its decisions about overly defensive
assertions. Remove the length double-check and simply put a failure
case if the Zip finds an uneven end in .next_back().

Fixing this up since I think I wrote this, and it's been known to
confuse rusties (PR #15886).
auto merge of #16718 : Sawyer47/rust/bool-cast, r=pcwalton

Current version of rust fails when casting from bool, e.g.
```rust
fn main() {
    let _a = false as uint;
    let _b = true as uint;
    let _c: [bool, ..false as uint];
    let _d: [bool, ..true as uint];
    // _a and _b work, but _c and _d result in an error
    // error: expected constant expr for vector length: can't cast str to uint
}
```
This commit makes it work as expected.
auto merge of #16646 : P1start/rust/trailing-commas, r=alexcrichton

This lets the parser understand trailing commas in method calls, method definitions, enum variants, and type parameters.

Closes #14240.
Closes #15887.
auto merge of #16694 : vadimcn/rust/debug-linker, r=alexcrichton

Shows linker spew even when linking succeeds.  This is occasionally useful in order to see verbose linker output.
native: Implement clone/close_accept for unix

This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for
unix. A windows implementation is coming in a later commit.

The clone implementation is based on atomic reference counting (as with all
other clones), and the close_accept implementation is based on selecting on a
self-pipe which signals that a close has been seen.
rustuv: Implement clone/close_accept

This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for
all of librustuv.

This implementation rewrites much of Access, AccessTimeout, and AcceptTimeout to
have type parameter for shared state that all acceptors share (a shared queue of
sockets). The incoming/outgoing channels have been removed as all timeouts and
such are now managed on the event loop rather than concurrently.
native: TCP close/close_accept for windows

This commit implements TcpAcceptor::{close, close_accept} for windows via
WSAEVENT types.
native: Add some documentation for accept

Document the new code for how close_accept and timeouts are implemented.
native: clone/close_accept for win32 pipes

This commits takes a similar strategy to the previous commit to implement
close_accept and clone for the native win32 pipes implementation.

Closes #15595
auto merge of #15704 : alexcrichton/rust/issue-15595, r=brson

If a task is spinning in an accept loop, there is currently no method of gracefully shutting it down. This PR introduces a way to do so by cloning the acceptor and implementing a close_accept method to unblocking any pending acceptor.

As with other I/O methods like this, it is `#[experimental]` from the start and sadly carries with it a good deal of code to support it. Much of the complication is from the fact that you can now concurrently accept on the same socket.

I tried to add a good deal of tests for this change, but another set of eyes is always appreciated!
auto merge of #16699 : treeman/rust/issue-8492, r=alexcrichton

Closes #8492.

I did not find this suggestion in the [guidelines][] but it's mentioned in the [old style guide][].

[guidelines]: https://github.com/rust-lang/rust-guidelines
[old style guide]: https://github.com/rust-lang/rust/wiki/Note-style-guide/73c864a10a8e231e2a6630e5a3461f1d3022a20a
rustc: Encode the visibility of foreign items

The privacy pass of the compiler was previously not taking into account the
privacy of foreign items, or bindings to external functions. This commit fixes
this oversight by encoding the visibility of foreign items into the metadata for
each crate.

Any code relying on this will start to fail to  compile and the bindings must be
marked with `pub` to indicate that they can be used externally.

Closes #16725
[breaking-change]
auto merge of #16740 : alexcrichton/rust/issue-16725, r=pcwalton

Closes #16725