Skip to content

Commit 5494b74

Browse files
committed
Remove Errno consts from platforms where they aren't defined.
Previously these were aliases for UnknownErrno. Now, they're compile errors.
1 parent 4c15c53 commit 5494b74

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
5757
longer be needed now that async/await are available. `AioCb`s now work
5858
exclusively with borrowed buffers, not owned ones.
5959
(#[1440](https://github.com/nix-rust/nix/pull/1440))
60+
- Removed some Errno values from platforms where they aren't actually defined.
61+
(#[1452](https://github.com/nix-rust/nix/pull/1452))
6062

6163
## [0.20.0] - 20 February 2021
6264
### Added

src/errno.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,6 @@ mod consts {
11071107
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
11081108
pub const EDEADLOCK: Errno = Errno::EDEADLK;
11091109

1110-
pub const EL2NSYNC: Errno = Errno::UnknownErrno;
1111-
11121110
pub fn from_i32(e: i32) -> Errno {
11131111
use self::Errno::*;
11141112

@@ -1332,8 +1330,6 @@ mod consts {
13321330
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
13331331
pub const EDEADLOCK: Errno = Errno::EDEADLK;
13341332

1335-
pub const EL2NSYNC: Errno = Errno::UnknownErrno;
1336-
13371333
pub fn from_i32(e: i32) -> Errno {
13381334
use self::Errno::*;
13391335

@@ -1547,8 +1543,6 @@ mod consts {
15471543
pub const EDEADLOCK: Errno = Errno::EDEADLK;
15481544
pub const EOPNOTSUPP: Errno = Errno::ENOTSUP;
15491545

1550-
pub const EL2NSYNC: Errno = Errno::UnknownErrno;
1551-
15521546
pub fn from_i32(e: i32) -> Errno {
15531547
use self::Errno::*;
15541548

@@ -1759,8 +1753,6 @@ mod consts {
17591753
pub const ELAST: Errno = Errno::ENOTSUP;
17601754
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
17611755

1762-
pub const EL2NSYNC: Errno = Errno::UnknownErrno;
1763-
17641756
pub fn from_i32(e: i32) -> Errno {
17651757
use self::Errno::*;
17661758

@@ -1972,8 +1964,6 @@ mod consts {
19721964
pub const ELAST: Errno = Errno::ENOTSUP;
19731965
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
19741966

1975-
pub const EL2NSYNC: Errno = Errno::UnknownErrno;
1976-
19771967
pub fn from_i32(e: i32) -> Errno {
19781968
use self::Errno::*;
19791969

@@ -2172,11 +2162,8 @@ mod consts {
21722162
EPROTO = libc::EPROTO,
21732163
}
21742164

2175-
pub const ELAST: Errno = Errno::UnknownErrno;
21762165
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
21772166

2178-
pub const EL2NSYNC: Errno = Errno::UnknownErrno;
2179-
21802167
pub fn from_i32(e: i32) -> Errno {
21812168
use self::Errno::*;
21822169

0 commit comments

Comments
 (0)