Skip to content

Commit e70bebb

Browse files
committed
refactor: annotate ELAST constants as unstable
this patch annotates symbols that are known to have been the source of semver-breaking issues by using a macro for which another pr has been opened. these issues have been tracked thus far in #3131.
1 parent 8372b50 commit e70bebb

8 files changed

Lines changed: 33 additions & 8 deletions

File tree

src/unix/bsd/apple/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,10 @@ pub const ENOTRECOVERABLE: c_int = 104;
21432143
pub const EOWNERDEAD: c_int = 105;
21442144
pub const EQFULL: c_int = 106;
21452145
pub const ENOTCAPABLE: c_int = 107;
2146-
pub const ELAST: c_int = 107;
2146+
2147+
ct! {
2148+
pub const ELAST: c_int = 107;
2149+
}
21472150

21482151
pub const EAI_AGAIN: c_int = 2;
21492152
pub const EAI_BADFLAGS: c_int = 3;

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,11 @@ pub const ENOMEDIUM: c_int = 93;
548548
pub const ENOTRECOVERABLE: c_int = 94;
549549
pub const EOWNERDEAD: c_int = 95;
550550
pub const EASYNC: c_int = 99;
551-
pub const ELAST: c_int = 99;
551+
552+
ct! {
553+
pub const ELAST: c_int = 99;
554+
}
555+
552556
pub const RLIMIT_POSIXLOCKS: c_int = 11;
553557
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
554558
pub const RLIM_NLIMITS: crate::rlim_t = 12;

src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ s! {
258258
}
259259
}
260260

261-
pub const ELAST: c_int = 96;
261+
ct! {
262+
pub const ELAST: c_int = 96;
263+
}
264+
262265
pub const RAND_MAX: c_int = 0x7fff_fffd;
263266
pub const KI_NSPARE_PTR: usize = 6;
264267
pub const MINCORE_SUPER: c_int = 0x20;

src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,10 @@ s! {
304304
}
305305

306306
pub const RAND_MAX: c_int = 0x7fff_fffd;
307-
pub const ELAST: c_int = 97;
307+
308+
ct! {
309+
pub const ELAST: c_int = 97;
310+
}
308311

309312
/// max length of devicename
310313
pub const SPECNAMELEN: c_int = 63;

src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ s! {
317317
}
318318

319319
pub const RAND_MAX: c_int = 0x7fff_ffff;
320-
pub const ELAST: c_int = 97;
320+
321+
ct! {
322+
pub const ELAST: c_int = 97;
323+
}
321324

322325
pub const KF_TYPE_EVENTFD: c_int = 13;
323326

src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ s! {
319319
}
320320

321321
pub const RAND_MAX: c_int = 0x7fff_ffff;
322-
pub const ELAST: c_int = 97;
322+
323+
ct! {
324+
pub const ELAST: c_int = 97;
325+
}
323326

324327
pub const KF_TYPE_EVENTFD: c_int = 13;
325328

src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,10 @@ s! {
321321
}
322322

323323
pub const RAND_MAX: c_int = 0x7fff_ffff;
324-
pub const ELAST: c_int = 97;
324+
325+
ct! {
326+
pub const ELAST: c_int = 97;
327+
}
325328

326329
pub const KF_TYPE_EVENTFD: c_int = 13;
327330

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,10 @@ pub const EBADMSG: c_int = 92;
945945
pub const ENOTRECOVERABLE: c_int = 93;
946946
pub const EOWNERDEAD: c_int = 94;
947947
pub const EPROTO: c_int = 95;
948-
pub const ELAST: c_int = 95;
948+
949+
ct! {
950+
pub const ELAST: c_int = 95;
951+
}
949952

950953
pub const F_DUPFD_CLOEXEC: c_int = 10;
951954

0 commit comments

Comments
 (0)