When encountering an Item in a pat context, point at the item def#67741
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 7, 2020
Merged
When encountering an Item in a pat context, point at the item def#67741bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
|
r? @Centril |
Contributor
Author
|
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
7251e3f
Compare
This comment has been minimized.
This comment has been minimized.
estebank
commented
Jan 7, 2020
7251e3f to
7a37d08
Compare
This comment has been minimized.
This comment has been minimized.
7a37d08 to
bd3b2b2
Compare
Centril
reviewed
Jan 9, 2020
bd3b2b2 to
1176e45
Compare
1176e45 to
f7332bf
Compare
Centril
reviewed
Jan 28, 2020
Contributor
Centril
left a comment
There was a problem hiding this comment.
r=me with these comments addressed
This comment has been minimized.
This comment has been minimized.
Centril
reviewed
Feb 25, 2020
Contributor
|
Ping @estebank :) |
f7332bf to
125159f
Compare
Contributor
Author
|
Rebased and addressed all coments, I believe. |
Contributor
|
Excellent! I'll follow up with a PR on my own to polish a bit, but this is great. @bors r+ |
Collaborator
|
📌 Commit 125159f has been approved by |
Collaborator
|
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Mar 7, 2020
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`
```
Fix rust-lang#55631, fix rust-lang#48062, cc rust-lang#42876.
bors
added a commit
that referenced
this pull request
Mar 7, 2020
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #55631, fix #48062, cc #42876.