-
Notifications
You must be signed in to change notification settings - Fork 152
feat: make page types repr(transparent) and range types repr(Rust)
#584
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
Conversation
095e56c to
4cfc2e5
Compare
Let's keep I can't think of a good example for a use-case of storing |
I see. If that is something we want to support, we should document that guarantee, though, right? Also in that case, we could make |
Yes, we should do that.
I think for a struct with a single (non-ZST) member, there's no difference between the two, but I agree that |
The memory layout should be the same, but the ABI when passing the types as arguments may be different for certain targets (armv7-a, M68k, mips, and powerpc64, for example): Compiler Explorer |
I'm learning a lot today :D |
Page, PhysFrame, and the range types repr(Rust)repr(transparent) and range types repr(Rust)
4cfc2e5 to
898fecc
Compare
898fecc to
4400472
Compare
Freax13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
And a big thanks for all the changes you contributed lately! We appreciate it!
This PR makes the custom paging range types
repr(Rust), as discussed in #581 (review).repr(C)for these types was introduced in 399b3d4.This PR also makes
PageandPhysFramerepr(Rust), since I did not find any code that does not use these types by value and depends on the representation in any way. I can undo that, though, if that undocumented representation is intentional.