auto merge of #12462 : kballard/rust/restore-llvm-from-12407, r=brson

PR #12407 was accidentally reverted by PR #12411. Restore the correct
version of LLVM that PR #12407 introduced.
mk: restore check-notidy.

tidy has some limitations (e.g. the "checked in binaries" check doesn't
and can't actually check git), and so it's useful to run tests without
running tidy occasionally.
auto merge of #12427 : alexcrichton/rust/snapshots, r=brson

This contains the fix for #4252 so we can start using methods in destructors.
auto merge of #12433 : alexcrichton/rust/fix-some-config-things, r=brson

These are mostly centered around using an external LLVM (notably 3.5)
auto merge of #12437 : alexcrichton/rust/travis-yml, r=brson

Travis CI provides an easy-to-use continuous integration infrastructure for
github repos to use. Travis will automatically test all PRs which are opened
against the rust repository, informing PR owners of the test results.

I believe that this will be a very convenient piece of infrastructure as we'll
be able to reduce the load on bors quite a bit. In theory all PRs opened have
had the full test suite run against them, but unfortunately this is rarely the
case (I'm a prime suspect). Travis will be able to provide easy and relatively
quick (~30min) feedback for PRs. By ensuring fewer failures on bors, we can
hopefully feed more successful jobs to bors.

Overall, I expect this to be very helpful for new contributors as well as
regular contributors as it's another layer of tests being run which will
hopefully catch things sooner. One of the most convenient parts about using
Travis is that there's very little burden in terms of maintenance, and if things
go wrong we can easily turn travis completely off.

Note that this is *not* the metric by which a PR will be merged with. Using
travis will purely be another source for running tests, we will continue to gate
all PRs on bors.
Warn about unnecessary parentheses upon assignment

Closes #12366.

Parentheses around assignment statements such as

    let mut a = (0);
    a = (1);
    a += (2);

are not necessary and therefore an unnecessary_parens warning is raised when
statements like this occur.

The warning mechanism was refactored along the way to allow for code reuse
between the routines for checking expressions and statements.

Code had to be adopted throughout the compiler and standard libraries to comply
with this modification of the lint.
auto merge of #12439 : cmr/rust/rustdoc-reset, r=thestinger

rustdoc: web: don't reset the search bar
auto merge of #12441 : kud1ing/rust/backticks, r=brson

Not all of those messages are covered by tests. I am not sure how to trigger them and where to put those tests.

Also some message patterns in the existing tests are not complete.
For example, i find `error: mismatched types: expected "i32" but found "char" (expected i32 but found char)` a bit repetitive, but as i can see there is no test covering that.
Fix emacs indentation of multi-line match patterns

Aligns to the same column if the previous line ends in a single '|' (but
not a '||').
auto merge of #12366 : aepsil0n/rust/feature/unnecessary_parens_around_assigned_values, r=alexcrichton

Fixes #12350.

Parentheses around assignment statements such as

```rust
let mut a = (0);
a = (1);
a += (2);
```

are not necessary and therefore an unnecessary_parens warning is raised when
statements like this occur.

NOTE: In `let` declarations this does not work as intended. Is it possible that they do not count as assignment expressions (`ExprAssign`)? (edit: this is fixed by now)

Furthermore, there are some cases that I fixed in the rest of the code, where parentheses could potentially enhance readability. Compare these lines:

```rust
a = b == c;
a = (b == c);
```

Thus, after having worked on this I'm not entirely sure, whether we should go through with this patch or not. Probably a matter of debate. ;)
Force all lang items to be reachable

This prevents linker errors as found in #11591

Closes #11591
auto merge of #11603 : alexcrichton/rust/issue-11591, r=brson

This prevents linker errors as found in #11591

Closes #11591
std: mark two helper functions #[inline].

`str::utf8_char_width` and `char::from_u32` are tiny, which means it's a
big performance hit to call them in a tight loop outside libstd.
std: fix the hash doctest
auto merge of #11863 : erickt/rust/hash, r=acrichto

This PR merges `IterBytes` and `Hash` into a trait that allows for generic non-stream-based hashing. It makes use of @eddyb's default type parameter support in order to have a similar usage to the old `Hash` framework.

Fixes #8038.

Todo:

- [x] Better documentation
- [ ] Benchmark
- [ ] Parameterize `HashMap` on a `Hasher`.
Fixed invalid JavaScript

Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
auto merge of #12448 : alexcrichton/rust/smaller-rust, r=brson

Two optimizations:

1. Compress `foo.bc` in each rlib with `flate`. These are just taking up space and are only used with LTO, no need for LTO to be speedy.
2. Stop install `librustc.rlib` and friends, this is a *huge* source of bloat. There's no need for us to install static libraries for these components.

cc #12440
auto merge of #12444 : thestinger/rust/arena, r=huonw

This prevents generating visit glue when using a TypedArena. The problem
still exists for the untyped Arena.
Emacs: stay at the correct position when indenting

When indenting a non-blank line, stay at the same cursor position
relative to the content after indenting.
Emacs: indent relative to enclosing block

This changes the indent to calculate positions relative to the enclosing
block (or braced/parenthesized expression), rather than by an absolute
nesting level within the whole file.  This allows things like this to
work:

    let x =
        match expr {
            Pattern => ...
        }

With the old method, only one level of nesting would be added within the
match braces, so "Pattern" would have ended up aligned with the match.

The other change is that multiple parens/braces on the same line only
increase the indent once.  This is a very common case for passing
closures/procs.  The absolute nesting method would do this:

    spawn(proc() {
            // Indented out two indent levels...
    })

whereas the code in this commit does this:

    spawn(proc() {
        // Indented out only one level...
    })