diff options
| author | BlackHoleFox <blackholefoxdev@gmail.com> | 2022-08-08 17:49:19 -0700 |
|---|---|---|
| committer | BlackHoleFox <blackholefoxdev@gmail.com> | 2022-08-08 17:56:21 -0700 |
| commit | 08c97323dee8b8558c8e1dc770885f0095360d32 (patch) | |
| tree | a49d8c0e7b1791b05859bb14de50bc3a36cc108a | |
| parent | f03ce30962cf1b2a5158667eabae8bf6e8d1cb03 (diff) | |
| download | rust-08c97323dee8b8558c8e1dc770885f0095360d32.tar.gz rust-08c97323dee8b8558c8e1dc770885f0095360d32.zip | |
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++.
| -rw-r--r-- | library/std/src/io/error.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index ff7fdcae16f..4e541dda906 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -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 { |
