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
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue