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

When accessing private field of union, do not misidentify it as a struct #63982

Merged
merged 2 commits into from
Aug 30, 2019

Conversation

sam09
Copy link
Contributor

@sam09 sam09 commented Aug 28, 2019

Fix incorrect error message when accessing private field of union.

Fixes #63976.

Fix incorrect error message when accessing
private field of union
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @zackmdavis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2019
@rust-highfive

This comment has been minimized.

Copy link
Member

@zackmdavis zackmdavis left a comment

Choose a reason for hiding this comment

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

Can you update tests with ./x.py test --stage 1 src/test/ui --bless (see also the dev guide chapter)?

src/librustc_typeck/check/expr.rs Outdated Show resolved Hide resolved
@zackmdavis zackmdavis 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 Aug 28, 2019
@estebank estebank changed the title Fixes #63976. Incorrect error message. When accessing private field of union, do not misidentify it as a struct Aug 28, 2019
@estebank
Copy link
Contributor

r? @estebank

@bors r+

@bors
Copy link
Contributor

bors commented Aug 29, 2019

📌 Commit 378c32b has been approved by estebank

@rust-highfive rust-highfive assigned estebank and unassigned zackmdavis Aug 29, 2019
@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 Aug 29, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 30, 2019
When accessing private field of union, do not misidentify it as a struct

Fix incorrect error message when accessing private field of union.

Fixes rust-lang#63976.
bors added a commit that referenced this pull request Aug 30, 2019
Rollup of 4 pull requests

Successful merges:

 - #61626 (Get rid of special const intrinsic query in favour of `const_eval`)
 - #63600 (Merge oli-obk mail addresses)
 - #63684 (Constify LinkedList new function)
 - #63982 (When accessing private field of union, do not misidentify it as a struct)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Aug 30, 2019

⌛ Testing commit 378c32b with merge 4295eea...

bors added a commit that referenced this pull request Aug 30, 2019
When accessing private field of union, do not misidentify it as a struct

Fix incorrect error message when accessing private field of union.

Fixes #63976.
@bors
Copy link
Contributor

bors commented Aug 30, 2019

☀️ Test successful - checks-azure
Approved by: estebank
Pushing 4295eea to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 30, 2019
@bors bors merged commit 378c32b into rust-lang:master Aug 30, 2019
@sam09 sam09 deleted the fix-63976 branch September 1, 2019 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

Incorrect error message when accessing private field of union
5 participants