Issue #9629 -- permit freezing `&mut` found within an `&` pointer
std::rand: move normal and exponential to their own file.
std::rand: implement the log-normal distribution.
rustdoc: fix the search-bar layout

Now with broader compatibility.
std::rand: implement the chi-squared distribution.
std::rand: implement the F distribution.
std::rand: implement the student t distribution.
Use LLVM integrated assembler on Windows too.
Disable failing test.
Add defun motions for rust-mode.

Specifically, we can now use:
+ beginning-of-defun
+ end-of-defun
+ mark-defun

where "defun" means a Rust item.

+ Add tests in rust-mode-tests.el
+ Fix indentation in rust-mode-tests.el
+ Add support for trait to Imenu
auto merge of #10874 : vadimcn/rust/integrated-as, r=alexcrichton

Last LLVM update seems to have fixed whatever prevented LLVM integrated assembler from generating correct unwind tables on Windows.   This PR switches Windows builds to use internal assembler by default.
Compilation via external assembler can still be requested via the newly added `-Z no-integrated-as` option.

Closes #8809
auto merge of #10859 : huonw/rust/helper-dists, r=cmr

This moves `std::rand::distribitions::{Normal, StandardNormal}` to `...::distributions::normal`, reexporting `Normal` from `distributions` (and similarly for `Exp` and Exp1`), and adds:
- Log-normal
- Chi-squared
- F
- Student T

all of which are implemented in C++11's random library. Tests in https://github.com/huonw/random-tests/commit/0424b8aded5e608ae386c1f917934a726d9cac6a. Note that these are approximately half documentation & half implementation (of which a significant portion is boilerplate `}`'s and so on).
Add some Any docs.
auto merge of #10840 : cmr/rust/any_docs2, r=huonw
Extend allocation lint for boxing expressions
auto merge of #10881 : sanxiyn/rust/allocation-lint-2, r=alexcrichton
Store metadata separately in rlib files

Right now whenever an rlib file is linked against, all of the metadata from the
rlib is pulled in to the final staticlib or binary. The reason for this is that
the metadata is currently stored in a section of the object file. Note that this
is intentional for dynamic libraries in order to distribute metadata bundled
with static libraries.

This commit alters the situation for rlib libraries to instead store the
metadata in a separate file in the archive. In doing so, when the archive is
passed to the linker, none of the metadata will get pulled into the result
executable. Furthermore, the metadata file is skipped when assembling rlibs into
an archive.

The snag in this implementation comes with multiple output formats. When
generating a dylib, the metadata needs to be in the object file, but when
generating an rlib this needs to be separate. In order to accomplish this, the
metadata variable is inserted into an entirely separate LLVM Module which is
then codegen'd into a different location (foo.metadata.o). This is then linked
into dynamic libraries and silently ignored for rlib files.

While changing how metadata is inserted into archives, I have also stopped
compressing metadata when inserted into rlib files. We have wanted to stop
compressing metadata, but the sections it creates in object file sections are
apparently too large. Thankfully if it's just an arbitrary file it doesn't
matter how large it is.

I have seen massive reductions in executable sizes, as well as staticlib output
sizes (to confirm that this is all working).
Add missing .com
Implement PortReader and ChanWriter
Address nits for PR for #9629