Skip to content

Commit 08c9732

Browse files
committed
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++.
1 parent f03ce30 commit 08c9732

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/io/error.rs

+2
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ impl Error {
564564
/// println!("last OS error: {os_error:?}");
565565
/// ```
566566
#[stable(feature = "rust1", since = "1.0.0")]
567+
#[doc(alias = "GetLastError")]
568+
#[doc(alias = "errno")]
567569
#[must_use]
568570
#[inline]
569571
pub fn last_os_error() -> Error {

0 commit comments

Comments
 (0)