Fixed other tests to pass make check
Fixed tidy errors
Added more documentation on ToSocketAddr trait
auto merge of #18546 : bkoropoff/rust/unboxed-closures-cross-crate, r=nick29581

This fixes some metadata/AST encoding problems that lead to ICEs.  The way this is currently handled will need revisiting if abstract return types are added, as unboxed closure types from extern crates could show up without being inlined into the local crate.

Closes #16790 (I think this was fixed earlier by accident and just needed a test case)
Closes #18378
Closes #18543

r? @pcwalton
Register snapshots.
auto merge of #18646 : eddyb/rust/snapshots, r=alexcrichton
debuginfo: Make LLDB test make targets dependent on lldb python scripts.
debuginfo: Add timeout before running executable in LLDB tests.

This should help with a potential race condition.
rename deprecated non_uppercase_statics to non_upper_case_globals
Repair various cases where values of distinct types were being operated
upon (e.g., `&int` added to `int`).
Add impls of the comparison operators for fixed-length arrays of lengths 0...32 and repair various cases where slices and fixed-length arrays were being compared.
Rename misspelled module reference.
Add missing dragonfly module.
Fixed not compiling code in docstring
Implement new operator dispatch semantics.

Key points are:
1. `a + b` maps directly to `Add<A,B>`, where `A` and `B` are the types of `a` and `b`.
2. Indexing and slicing autoderefs consistently.
Update the guide examples and try not to leave user hanging as to what
this `&x` sigil is all about.
Remove incorrect doc annotation, mark experimental since we haven't discussed in an API meeting
Better debug printouts
debuginfo: Add a timeout for LLDB tests.

Fixes #18649.
auto merge of #18462 : netvl/rust/to-socket-addr, r=alexcrichton

This is a follow-up to [RFC PR #173](https://github.com/rust-lang/rfcs/pull/173). I was told there that changes like this don't need to go through the RFC process, so I'm submitting this directly.

This PR introduces `ToSocketAddr` trait as defined in said RFC. This trait defines a conversion from different types like `&str`, `(&str, u16)` or even `SocketAddr` to `SocketAddr`. Then this trait is used in all constructor methods for `TcpStream`, `TcpListener` and `UdpSocket`.

This unifies these constructor methods - previously they were using different types of input parameters (TCP ones used `(&str, u16)` pair while UDP ones used `SocketAddr`), which is not consistent by itself and sometimes inconvenient - for example, when the address initially is available as `SocketAddr`, you still need to convert it to string to pass it to e.g. `TcpStream`. This is very prominently demonstrated by the unit tests for TCP functionality. This PR makes working with network objects much like with `Path`, which also uses similar trait to be able to be constructed from `&[u8]`, `Vec<u8>` and other `Path`s.

This is a breaking change. If constant literals were used before, like this:
```rust
TcpStream::connect("localhost", 12345)
```
then the nicest fix is to change it to this:
```rust
TcpStream::connect("localhost:12345")
```

If variables were used before, like this:
```rust
TcpStream::connect(some_address, some_port)
```
then the arguments should be wrapped in another set of parentheses:
```rust
TcpStream::connect((some_address, some_port))
```

`UdpSocket` usages won't break because its constructor method accepted `SocketAddr` which implements `ToSocketAddr`, so `bind()` calls:
```rust
UdpSocket::bind(some_socket_addr)
```
will continue working as before.

I haven't changed `UdpStream` constructor because it is deprecated anyway.