rust/src/librustc_resolve
bors a35a3abcda Auto merge of #45050 - petrochenkov:ambind, r=nikomatsakis
resolve: Use same rules for disambiguating fresh bindings in `match` and `let`

Resolve `Unit` as a unit struct pattern in
```rust
struct Unit;

let Unit = x;
```
consistently with
```rust
match x {
    Unit => {}
}
```
It was previously an error.
(The change also applies to unit variants and constants.)

Fixes https://users.rust-lang.org/t/e0530-cannot-shadow-unit-structs-what-in-the-earthly-what/13054
(This particular change doesn't depend on a fix for the issue mentioned in https://users.rust-lang.org/t/e0530-cannot-shadow-unit-structs-what-in-the-earthly-what/13054/4)

cc @rust-lang/lang
r? @nikomatsakis
2017-11-10 19:10:12 +00:00
..
build_reduced_graph.rs Fix help for duplicated names: extern crate (...) as (...) 2017-11-08 10:36:14 -08:00
Cargo.toml Make DefIndex use newtype_index macro 2017-11-04 19:22:37 -03:00
check_unused.rs Fix help for duplicated names: extern crate (...) as (...) 2017-11-08 10:36:14 -08:00
diagnostics.rs doc-test: In Markdown tests, Use all of <h1> to <h6> as the test name. 2017-10-08 00:49:33 +08:00
lib.rs Auto merge of #45050 - petrochenkov:ambind, r=nikomatsakis 2017-11-10 19:10:12 +00:00
macros.rs Make DefIndex use newtype_index macro 2017-11-04 19:22:37 -03:00
resolve_imports.rs Fix help for duplicated names: extern crate (...) as (...) 2017-11-08 10:36:14 -08:00