From f722733480363c6c7152943c96f0008e79625f23 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Sat, 30 May 2026 17:49:34 +0200 Subject: [PATCH] refactor: deprecate constants matching `_NUM` These symbols, alongside those matching the `_MAX`, `_COUNT` and `_LAST`-suffixed constants, have been deprecated in favor of keeping more stable SemVer guarantees. For more on the reasons why some of these constants were deprecated, while others weren't, see the accompanying PR. --- src/unix/linux_like/linux_l4re_shared.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/unix/linux_like/linux_l4re_shared.rs b/src/unix/linux_like/linux_l4re_shared.rs index 6b320ff4effa2..74693d51ae02b 100644 --- a/src/unix/linux_like/linux_l4re_shared.rs +++ b/src/unix/linux_like/linux_l4re_shared.rs @@ -690,6 +690,12 @@ pub const EI_CLASS: usize = 4; pub const ELFCLASSNONE: u8 = 0; pub const ELFCLASS32: u8 = 1; pub const ELFCLASS64: u8 = 2; +#[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 ELFCLASSNUM: usize = 3; pub const EI_DATA: usize = 5; @@ -821,6 +827,12 @@ pub const EM_ALPHA: u16 = 0x9026; // elf.h - Legal values for e_version (version). pub const EV_NONE: u32 = 0; pub const EV_CURRENT: u32 = 1; +#[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 EV_NUM: u32 = 2; // elf.h - Legal values for p_type (segment type).