Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typeck: minor pattern typing improvements #70386

Merged
merged 4 commits into from
Mar 26, 2020
Merged

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 25, 2020

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 25, 2020
Comment on lines +68 to +69
LL | let NormalStruct { first_field, second_field , .. } = ns;
| ^^^^^^
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like it if we could get around pointing at the closing brace and the preceding space, but that would complicate the span gather code quite dramatically...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trust me, I tried several clever iterations to fix that but I got nowhere. :)

@@ -62,18 +62,33 @@ error[E0638]: `..` required with struct marked as non-exhaustive
|
LL | let NormalStruct { first_field, second_field } = ns;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: add `..` at the end of the field list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some explanation along the lines of "add .. at the end of the field list to ignore all other fields".

r=me

@Centril
Copy link
Contributor Author

Centril commented Mar 26, 2020

@bors r=estebank

@bors
Copy link
Contributor

bors commented Mar 26, 2020

📌 Commit da10963 has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 26, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 26, 2020
Rollup of 6 pull requests

Successful merges:

 - rust-lang#69866 (Rename `def_span` to `guess_head_span`)
 - rust-lang#69878 (Tweak chained operators diagnostic)
 - rust-lang#70375 (avoid catching InterpError)
 - rust-lang#70386 (typeck: minor pattern typing improvements)
 - rust-lang#70389 (borrowck: prefer "value" over "`_`" in diagnostics)
 - rust-lang#70395 (Update cargo.)

Failed merges:

r? @ghost
@bors bors merged commit ca7dfb1 into rust-lang:master Mar 26, 2020
@Centril Centril deleted the patty branch March 26, 2020 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants