Add standard C error function aliases
Aids the discoverability of `io::Error::last_os_error()` by linking to commonly used error number functions from C/C++.
This commit is contained in:
parent
f03ce30962
commit
08c97323de
@ -564,6 +564,8 @@ impl Error {
|
||||
/// println!("last OS error: {os_error:?}");
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(alias = "GetLastError")]
|
||||
#[doc(alias = "errno")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn last_os_error() -> Error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user