Skip to content

Emit specific error for struct literal in conditions #59981

New issue

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

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

Already on GitHub? # to your account

Merged
merged 4 commits into from
Apr 19, 2019

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Apr 15, 2019

Fix #59962, fix #51311.

@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2019
@estebank estebank force-pushed the recover-struct-lit branch from aa2f15b to 1a191c9 Compare April 15, 2019 00:09
@rust-highfive

This comment has been minimized.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2019
@bors

This comment has been minimized.

@estebank estebank force-pushed the recover-struct-lit branch from c9c441c to e374041 Compare April 18, 2019 18:35
@estebank estebank added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 18, 2019
@petrochenkov
Copy link
Contributor

Added one commit fixing the case with boolean literals and also improving a e s t h e t i c s.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 18, 2019

📌 Commit 9c42ec3 has been approved by petrochenkov

@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 Apr 18, 2019
@estebank
Copy link
Contributor Author

@petrochenkov neat

Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
…ochenkov

Emit specific error for struct literal in conditions

Fix rust-lang#59962, fix rust-lang#51311.
@bors

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 19, 2019
@estebank estebank force-pushed the recover-struct-lit branch 2 times, most recently from 7005f9c to 88e0c6a Compare April 19, 2019 01:00
@estebank

This comment has been minimized.

Copy link
Contributor Author

@estebank estebank left a comment

Choose a reason for hiding this comment

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

@petrochenkov I am aware of the hackiness of the approach 😬

@rust-highfive

This comment has been minimized.

@bors

This comment has been minimized.

@estebank
Copy link
Contributor Author

Removing the changes after the review was made, rebasing to fix merge conflicts and posting follow up PR for easier review.

@estebank estebank force-pushed the recover-struct-lit branch from 99e7c97 to aa393b0 Compare April 19, 2019 17:33
@estebank
Copy link
Contributor Author

@bors r=petrochenkov rebased

@bors
Copy link
Collaborator

bors commented Apr 19, 2019

📌 Commit aa393b0 has been approved by petrochenkov

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 19, 2019
@bors
Copy link
Collaborator

bors commented Apr 19, 2019

⌛ Testing commit aa393b0 with merge 8aaae42...

bors added a commit that referenced this pull request Apr 19, 2019
Emit specific error for struct literal in conditions

Fix #59962, fix #51311.
@bors
Copy link
Collaborator

bors commented Apr 19, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing 8aaae42 to master...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

Struct-style enum constructor gets misparsed as type ascription without suggestion Misleading error message in case of ambiguous if blocks
4 participants