mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Add safe layout reprs and safety comments about layout
This commit is contained in:
parent
f8a2f458b0
commit
80f14f61df
5 changed files with 12 additions and 2 deletions
|
@ -152,6 +152,7 @@ impl Symbol {
|
|||
}
|
||||
|
||||
pub const fn to_ne_bytes(self) -> [u8; 8] {
|
||||
// repr(packed(4)) is repr(c), and with the fields as defined will not having padding.
|
||||
unsafe { std::mem::transmute(self) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue