Uh oh!
There was an error while loading. Please reload this page.
When encountering an Item in a pat context, point at the item def - #67741
Conversation
This comment has been minimized.
This comment has been minimized.
Centril
commented
Dec 31, 2019
r? @Centril |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
estebank
commented
Dec 31, 2019
I'm away for a week. I'll incorporate the feedback once I'm back. |
This comment has been minimized.
This comment has been minimized.
1c1142d to
7251e3fCompare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
7251e3f to
7a37d08Compare
This comment has been minimized.
This comment has been minimized.
7a37d08 to
bd3b2b2CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bd3b2b2 to
1176e45Compare1176e45 to
f7332bfCompare
Centril
left a comment
There was a problem hiding this comment.
r=me with these comments addressed
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Centril
commented
Mar 4, 2020
Ping @estebank :) |
estebank
commented
Mar 6, 2020
Rebased and addressed all coments, I believe. |
Centril
commented
Mar 7, 2020
Excellent! I'll follow up with a PR on my own to polish a bit, but this is great. @bors r+ |
bors
commented
Mar 7, 2020
📌 Commit 125159f has been approved by |
bors
commented
Mar 7, 2020
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
When encountering an Item in a pat context, point at the item def
```
error[E0308]: mismatched types
--> $DIR/const-in-struct-pat.rs:8:17
|
LL | struct foo;
| ----------- `foo` defined here
...
LL | let Thing { foo } = t;
| ^^^ expected struct `std::string::String`, found struct `foo`
|
= note: `foo` is interpreted as a unit struct, not a new binding
help: you can bind the struct field to a different name
|
LL | let Thing { foo: other_foo } = t;
| ^^^^^^^^^^^^^^
```
```
error[E0308]: mismatched types
--> $DIR/const.rs:14:9
|
LL | const FOO: Foo = Foo{bar: 5};
| ----------------------------- constant defined here
...
LL | FOO => {},
| ^^^
| |
| expected `&Foo`, found struct `Foo`
| `FOO` is interpreted as a constant, not a new binding
| help: use different name to introduce a new binding: `other_foo`
```
Fixrust-lang#55631, fixrust-lang#48062, cc rust-lang#42876.Rollup of 9 pull requests Successful merges: - #67741 (When encountering an Item in a pat context, point at the item def) - #68985 (Parse & reject postfix operators after casts) - #69656 (Use .next() instead of .nth(0) on iterators.) - #69680 (rustc_expand: Factor out `Annotatable::into_tokens` to a separate method) - #69690 (test(pattern): add tests for combinations of pattern features) - #69706 (Use subslice patterns in slice methods) - #69727 (Avoid using `unwrap()` in suggestions) - #69754 (Update deprecation version to 1.42 for Error::description) - #69782 (Don't redundantly repeat field names (clippy::redundant_field_names)) Failed merges: r? @ghost
Fix#55631, fix#48062, cc #42876.