Warn on pattern bindings that have the same name as a variant

...of the type being matched.

This change will result in a better diagnostic for code like the following:

```rust
enum Enum {
    Foo,
    Bar
}

fn f(x: Enum) {
    match x {
        Foo => (),
        Bar => ()
    }
}
```

which would currently simply fail with an unreachable pattern error
on the 2nd arm.

The user is advised to either use a qualified path in the patterns
or import the variants explicitly into the scope.
Do not print any warnings if '-A warnings' is specified on the command line
auto merge of #19115 : jakub-/rust/issue-19100, r=alexcrichton

...of the type being matched.

This change will result in a better diagnostic for code like the following:

```rust
enum Enum {
    Foo,
    Bar
}

fn f(x: Enum) {
    match x {
        Foo => (),
        Bar => ()
    }
}
```

which would currently simply fail with an unreachable pattern error
on the 2nd arm.

The user is advised to either use a qualified path in the patterns
or import the variants explicitly into the scope.
rollup merge of #19224: frewsxcv/unprefix-json-types

Addressing the issues brought up in [this thread](https://github.com/rust-lang/rust/pull/19114#discussion_r20614461)

This pull request:

* Unpublicizes reexports
* Renames type aliases:
 * `json::JsonArray` ☞ `json::Array`
 * `json::JsonObject` ☞ `json::Object`
rollup merge of #19231: Gankro/ringbuf-into-iter

r? @huonw @csherratt
rollup merge of #19266: aochagavia/const

With this PR, the following code works:

```
#![feature(tuple_indexing)]
struct MyStruct { field1: uint }

const S: MyStruct = MyStruct { field1: 42u };
const T: (uint,) = (42u,);

struct ConstCheck {
    array1: [int, ..S.field1],
    array2: [int, ..T.0],
}
```

Closes https://github.com/rust-lang/rust/issues/19244
Related https://github.com/rust-lang/rust/issues/19265
rollup merge of #19272: tomjakubowski/rustdoc-sized

Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly.

Fix #18515
rollup merge of #19273: ogham/rename-file-types

All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.

RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.

Part of #19253.
rollup merge of #19282: steveklabnik/remove_grammar

I stumbled across this today, and it's not really working. It's been around for a very, very long time, and seems to be based on stuff we don't even have anymore.

I asked in `#rust-internals`, and @cmr said we should just kill it, so here I am. :) I don't think that anything else uses Java, but maybe I missed something.

And if this _isn't_ what we want, I'm fine with closing too. Just some housekeeping.
rollup merge of #19287: alexcrichton/issue-19272

At the same time remove the `pub use` of the variants in favor of accessing
through the enum type itself. This is a breaking change as the `Found` and
`NotFound` variants must now be imported through `BinarySearchResult` instead of
just `std::slice`.

[breaking-change]
Closes #19271
rollup merge of #19288: steveklabnik/doc_style_cleanup

This is considered good convention.

This is about half of them in total, I just don't want an impossible to land patch. :smile:
rollup merge of #19296: csouth3/trieset-union

TrieSet doesn't yet have union, intersection, difference, and symmetric difference functions implemented.  Luckily, TrieSet is largely similar to TreeSet, so I was able to reference the implementations of these functions in the latter, and adapt them as necessary to make them work for TrieSet.

One thing that I thought was interesting is that the Iterator yielded by `iter()` for TrieSet iterates over the set's values directly rather than references to the values (whereas I think in most cases I see the Iterator given by `iter()` iterating over immutable references), so for consistency within TrieSet's interface, all of these Iterators also iterate over the values directly.  Let me know if all of these should be instead iterating over references.
rollup merge of #19298: nikomatsakis/unboxed-closure-parse-the-plus

Implements RFC 438.

Fixes #19092.

This is a [breaking-change]: change types like `&Foo+Send` or `&'a mut Foo+'a` to `&(Foo+Send)` and `&'a mut (Foo+'a)`, respectively.

r? @brson
rollup merge of #19299: nikomatsakis/stop-indenting-test-output

This fixes a long-time irritant of mine. Inserting tabs causes M-x next-error to not work in emacs and seems to serve relatively little purpose in improving overall readability.

r? @brson
rollup merge of #19300: killercup/patch-1

Just saw this when looking at #19297 and couldn't find an issue/PR dealing with this. #18773 seems to have missed this file.

Compiler output is generated [here](https://github.com/rust-lang/rust/blob/770378a313a573776b16237a46b75bafa49072c1/src/librustc_trans/driver/mod.rs#L466).

cc @steveklabnik
rollup merge of #19301: Gankro/take-fix

Was taking the value out correctly, but then not doing anything to actually fix the table. derp.
rollup merge of #19304: steveklabnik/gh19302

Fixes #19302.

Also made a minor cosmetic change to bring the example in line with style guidelines.
rollup merge of #19307: steveklabnik/gh19199

Fixes #19199
rollup merge of #19308: thestinger/oom

Closes #19305
rollup merge of #19310: steveklabnik/gh19178

Fixes #19178