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

Don't pretend that TreeWalkCbData is transparent. #989

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Sep 16, 2023

This is doing some pointer casts that make the assumption that TreeWalkCbData is transparent, when it is not declared as such. Although this is unlikely to be an issue in practice, it breaks the rules about repr(rust) type layout. This reworks it to avoid that assumption. I think it could potentially be repr(transparent), but I'm not sure that is really necessary. There's probably a better way to avoid the wrapper, but I'm not inclined to try to find it.

@ehuss ehuss added this pull request to the merge queue Sep 18, 2023
Merged via the queue into rust-lang:master with commit a66496a Sep 18, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant