diff --git a/src/solid/mod.rs b/src/solid/mod.rs index 0182f8150df67..03e4a5c244157 100644 --- a/src/solid/mod.rs +++ b/src/solid/mod.rs @@ -219,6 +219,12 @@ pub const LC_MONETARY: c_int = 3; pub const LC_NUMERIC: c_int = 4; pub const LC_TIME: c_int = 5; pub const LC_MESSAGES: c_int = 6; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const _LC_LAST: c_int = 7; pub const EPERM: c_int = 1; diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index e642ef18ebc27..bd2c589ab174e 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1736,7 +1736,18 @@ pub const LC_NUMERIC_MASK: c_int = 1 << crate::LC_NUMERIC; pub const LC_TIME_MASK: c_int = 1 << crate::LC_TIME; pub const LC_MESSAGES_MASK: c_int = 1 << crate::LC_MESSAGES; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] const _LC_LAST: c_int = 7; +// NOTE: the constant is meant to be marked for deprecation, but its dependent +// uses are not. This constant is used as a bitmask where all bits for the above +// `LC_*` constants are on, and so it relies on `_LC_LAST` to more easily +// accomplish that. +#[allow(deprecated)] pub const LC_ALL_MASK: c_int = (1 << _LC_LAST) - 2; pub const LC_GLOBAL_LOCALE: crate::locale_t = -1isize as crate::locale_t; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index c6dd17697adae..77d82cb0222dd 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1937,6 +1937,12 @@ pub const NF_BR_PRI_BRNF: c_int = 0; pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100; pub const NF_BR_PRI_FILTER_OTHER: c_int = 200; pub const NF_BR_PRI_NAT_SRC: c_int = 300; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NF_BR_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv4.h @@ -1961,6 +1967,12 @@ pub const NF_IP_PRI_NAT_SRC: c_int = 100; pub const NF_IP_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300; pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = crate::INT_MAX; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NF_IP_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6.h @@ -1984,6 +1996,12 @@ pub const NF_IP6_PRI_SECURITY: c_int = 50; pub const NF_IP6_PRI_NAT_SRC: c_int = 100; pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NF_IP6_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6/ip6_tables.h diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 4c9392ab2434e..48d6db0aac477 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -2180,6 +2180,12 @@ pub const NF_BR_PRI_BRNF: c_int = 0; pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100; pub const NF_BR_PRI_FILTER_OTHER: c_int = 200; pub const NF_BR_PRI_NAT_SRC: c_int = 300; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NF_BR_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv4.h @@ -2204,6 +2210,12 @@ pub const NF_IP_PRI_NAT_SRC: c_int = 100; pub const NF_IP_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300; pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = crate::INT_MAX; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NF_IP_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6.h @@ -2227,6 +2239,12 @@ pub const NF_IP6_PRI_SECURITY: c_int = 50; pub const NF_IP6_PRI_NAT_SRC: c_int = 100; pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NF_IP6_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6/ip6_tables.h @@ -2304,9 +2322,26 @@ pub const SIOCGIWENCODEEXT: c_ulong = 0x8B35; pub const SIOCSIWPMKSA: c_ulong = 0x8B36; pub const SIOCIWFIRSTPRIV: c_ulong = 0x8BE0; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const SIOCIWLASTPRIV: c_ulong = 0x8BFF; pub const SIOCIWFIRST: c_ulong = 0x8B00; +// NOTE: the symbol we're defining here is itself also deprecated. I can't +// annotate this with `expect` nor provide a `reason` parameter to the attribute +// because those were still experimental back in 1.65 +// FIXME(msrv): change this to an `expect` with a `reason` once we bump. +#[allow(deprecated)] +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const SIOCIWLAST: c_ulong = SIOCIWLASTPRIV; pub const IWEVTXDROP: c_ulong = 0x8C00; diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index b31c31bd1f6c8..8f5b84a34390e 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -152,6 +152,12 @@ pub const LOCK_EX: c_int = 2; pub const LOCK_NB: c_int = 4; pub const LOCK_UN: c_int = 8; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const _PC_LAST: c_int = 101; pub const _CS_PATH: c_int = 65; diff --git a/src/unix/solarish/solaris.rs b/src/unix/solarish/solaris.rs index 992df9ddc0ad9..2d20309970dbc 100644 --- a/src/unix/solarish/solaris.rs +++ b/src/unix/solarish/solaris.rs @@ -132,6 +132,12 @@ pub const F_DUPFD_CLOFORK: c_int = 49; pub const F_DUP2FD_CLOEXEC: c_int = 48; pub const F_DUP2FD_CLOFORK: c_int = 50; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const _PC_LAST: c_int = 102; pub const PRIV_PROC_SENSITIVE: c_uint = 0x0008;