rust/src/test/ui/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
..
auxiliary Stabilize pub(restricted) 2017-03-15 22:39:04 -07:00
enums-are-namespaced-xc.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
enums-are-namespaced-xc.stderr Improve placement of use suggestions 2017-08-17 18:16:15 +02:00
issue-2356.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-2356.stderr reorder span labels 2017-07-18 00:07:37 +05:30
issue-3907-2.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-3907-2.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-3907.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-3907.stderr Improve placement of use suggestions 2017-08-17 18:16:15 +02:00
issue-5035-2.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-5035-2.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-5035.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-5035.stderr reorder span labels 2017-07-18 00:07:37 +05:30
issue-6702.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-6702.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-14254.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-14254.stderr Change some helps to suggestions 2017-07-17 10:03:37 +02:00
issue-16058.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-16058.stderr Only underline suggestion if it is not the only code being shown 2017-07-06 14:36:49 -07:00
issue-17518.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-17518.stderr Only underline suggestion if it is not the only code being shown 2017-07-06 14:36:49 -07:00
issue-18252.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-18252.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-19452.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-19452.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-21221-1.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-21221-1.stderr Only underline suggestion if it is not the only code being shown 2017-07-06 14:36:49 -07:00
issue-21221-2.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-21221-2.stderr Only underline suggestion if it is not the only code being shown 2017-07-06 14:36:49 -07:00
issue-21221-3.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-21221-3.stderr Improve placement of use suggestions 2017-08-17 18:16:15 +02:00
issue-21221-4.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-21221-4.stderr Improve placement of use suggestions 2017-08-17 18:16:15 +02:00
issue-23305.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-23305.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-24968.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-24968.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-33876.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
issue-33876.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
issue-39226.rs refac Move levenchstein before context dependent check 2017-04-28 20:40:11 +02:00
issue-39226.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
levenshtein.rs resolve: Levenshtein-based suggestions for non-import paths 2017-01-13 23:33:02 +03:00
levenshtein.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
name-clash-nullary.rs Move some tests to UI 2017-11-04 03:09:47 +03:00
name-clash-nullary.stderr Move some tests to UI 2017-11-04 03:09:47 +03:00
privacy-struct-ctor.rs Stabilize pub(restricted) 2017-03-15 22:39:04 -07:00
privacy-struct-ctor.stderr WIP: don't suggest placing use statements into expanded code 2017-08-31 15:45:16 +02:00
resolve-assoc-suggestions.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
resolve-assoc-suggestions.stderr Change some helps to suggestions 2017-07-17 10:03:37 +02:00
resolve-hint-macro.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
resolve-hint-macro.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
resolve-speculative-adjustment.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
resolve-speculative-adjustment.stderr Change some helps to suggestions 2017-07-17 10:03:37 +02:00
suggest-path-instead-of-mod-dot-item.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
suggest-path-instead-of-mod-dot-item.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
token-error-correct-2.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
token-error-correct-2.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
token-error-correct-3.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
token-error-correct-3.stderr Adjust new suggestions to the suggestion guidelines 2017-07-21 13:59:17 +02:00
token-error-correct.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
token-error-correct.stderr Detect = -> : typo in let bindings 2017-11-03 17:39:16 -07:00
tuple-struct-alias.rs More systematic error reporting in path resolution 2016-12-26 15:01:49 +03:00
tuple-struct-alias.stderr Revert "Change error count messages" 2017-07-02 13:49:30 +03:00
unboxed-closure-sugar-nonexistent-trait.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
unboxed-closure-sugar-nonexistent-trait.stderr resolve: Use path segment spans in smart_resolve_path 2017-03-10 08:21:45 -08:00
unresolved_static_type_field.rs Move some compile-fail tests into UI directory 2016-12-26 12:58:33 +03:00
unresolved_static_type_field.stderr reorder span labels 2017-07-18 00:07:37 +05:30
use_suggestion_placement.rs Add test for broken suggestion 2017-08-31 13:06:53 +02:00
use_suggestion_placement.stderr WIP: don't suggest placing use statements into expanded code 2017-08-31 15:45:16 +02:00