Skip to content

refactor: deprecate *COUNT consts fitting #3131#5121

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:_count-deprecation
Open

refactor: deprecate *COUNT consts fitting #3131#5121
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:_count-deprecation

Conversation

@dybucc
Copy link
Copy Markdown
Contributor

@dybucc dybucc commented May 28, 2026

Description

Constants matching the *COUNT naming scheme, and whose purpose fits that of a "delimitter" value
have been deprecated as part of the deprecation efforts stemming from #3131.

This patch continues deprecation of symbols matching one of the most common suffixes in identifiers
for constants whose value fits that of a "limit." The changes here follow from those in
#3620, with the recommended fixes by Amanieu (not pinging for now.)

This is a follow up PR to #5120.

Notes

A few of the constants I couldn't decide on under mach/host_info.h and sys/attr.h in Apple's
distribution of the XNU kernel have been deprecated as per prior work by Lilit0x and comments by
Amanieu in #3620.

I couldn't pinpoint where was the DLFO_STRUCT_HAS_EH_COUNT constant declared and used in the GNU
Hurd upstream repo, so I haven't been able to make any decisions there.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 28, 2026

Some changes occurred in an Android module

cc @maurer

Some changes occurred in a solarish module

cc @jclulow, @pfmooney

These constants were already part of prior deprecation efforts in
rust-lang#3620, though this was not completed. Alongside the work
and comments there, a few other constants have been researched and
marked for deprecation.

The accompnying PR contains sources to upstream kernels/libraries with
reasoning as to why some constants were deprecated and others weren't.
@dybucc dybucc force-pushed the _count-deprecation branch from d36f780 to 70cd6ca Compare May 29, 2026 06:51
@dybucc dybucc changed the title refactor: deprecate *COUNT consts fitting rust-lang/libc#3131 refactor: deprecate *COUNT consts fitting rust-lang/libc#3131 May 29, 2026
@dybucc dybucc changed the title refactor: deprecate *COUNT consts fitting rust-lang/libc#3131 refactor: deprecate *COUNT consts fitting #3131 May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants