Open
Description
Previously, all Rust targets with std
were using i32
for "raw" OS error codes, i.e. io::Error::raw_os_error/from_raw_os_error
have accepted i32
. We have encoded this assumption in Error::raw_os_error
, fmt::Debug/Display
, and From<Error> for io::Error
implementations.
But in the recently added UEFI std
implementation usize
is used for error codes instead as per UEFI spec. It's reflected by the new (Nightly-only) type alias RawOsError
For now, we just added cfg
-based exceptions for UEFI targets in the relevant internal implementations (see #566). But it may be worth to reconsider our use of NonZeroU32
for Error
internal representation and return type of Error::raw_os_error
.
cc @usamoi
Metadata
Assignees
Labels
No labels
Activity