-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add design doc for zerovec #1537
Conversation
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.
Halfway through
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
utils/zerovec/design_doc.md
Outdated
|
||
These can only be applied to structs where all fields are ULE types (for `#[derive(VarULE)]`, the last field must be an unsized `VarULE` type). These derives will do the following things: | ||
|
||
- Apply `#[repr(packed)]` to the type |
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.
If all fields are ULE
then it doesn't need #[repr(packed)]
, right?
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.
No, it still needs it, repr(Rust) is not stable or defined
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.
Does repr(C) produce the same result as repr(packed) on types with ULE fields?
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.
I'm not sure.... maybe? It's worth looking in to. It would certainly make some things easier since rust has restrictions on packed types.
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
Co-authored-by: Shane F. Carr <shane@unicode.org>
Progress towards #1475
I haven't done a final pass but I think this is ready for review to at least start.