Skip to content

refactor: deprecate ELAST constants#5118

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

refactor: deprecate ELAST constants#5118
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:elast-deprecation

Conversation

@dybucc
Copy link
Copy Markdown
Contributor

@dybucc dybucc commented May 27, 2026

Description

This set of constants had already been discussed to cause some issues in #3131. This patch
deprecates such bug-prone and latest-error symbols such that the interface to the libc crate is
not prone to SemVer-breakage as often as the values change upstream.

Note the NetBSD constant was left unmodified as it already had been annotated with a deprecation
attribute.

If you yourself want to help out in the deprecation effort for this type of constants across the
libc crate, maybe try out the libc-constant-deprecator crate. It's been the tool
used to perform the changes that have been submitted in this PR, and it very much welcomes bug
reports.

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 27, 2026

Some changes occurred in a NetBSD-like module

cc @semarie

Some changes occurred in an OpenBSD module

cc @semarie

@rustbot

This comment has been minimized.

@dybucc dybucc force-pushed the elast-deprecation branch from 79a9fea to 53d55bf Compare May 28, 2026 07:45
This set of constants had already been discussed to cause some issues in
rust-lang#3131. This patch deprecates such bu-prone and
latest-error symbols such that the interface to the `libc` crate is not
prone to SemVer-breakage as often as the values change upstream.
@dybucc dybucc force-pushed the elast-deprecation branch from 53d55bf to cd01c4c Compare May 28, 2026 10:45
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 28, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

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