Rollup merge of #150064 - Ayush1325:uefi-io-repr-comment, r=bjorn3
std: io: error: Add comment for UEFI unpacked repr use The following commit adds the comment explaining the rational why UEFI uses unpacked representation on 64-bit platforms as opposed to bit-packed representation used in all other 64-bit platforms. r? `@bjorn3`
This commit is contained in:
commit
ff84058781
1 changed files with 7 additions and 0 deletions
|
|
@ -1,6 +1,13 @@
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
// On 64-bit platforms, `io::Error` may use a bit-packed representation to
|
||||
// reduce size. However, this representation assumes that error codes are
|
||||
// always 32-bit wide.
|
||||
//
|
||||
// This assumption is invalid on 64-bit UEFI, where error codes are 64-bit.
|
||||
// Therefore, the packed representation is explicitly disabled for UEFI
|
||||
// targets, and the unpacked representation must be used instead.
|
||||
#[cfg(all(target_pointer_width = "64", not(target_os = "uefi")))]
|
||||
mod repr_bitpacked;
|
||||
#[cfg(all(target_pointer_width = "64", not(target_os = "uefi")))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue