Skip to content

feat: add macro to declare unstable constants#5180

Closed
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:constant-macro
Closed

feat: add macro to declare unstable constants#5180
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:constant-macro

Conversation

@dybucc

@dybucc dybucc commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a new macro that should align with the new usage guidelines in #5179.

This macro is meant to be used with constants that are likely to suffer from SemVer-breaking changes but which the new usage guidelines accept as being part of stable libc crate relases.

It has been used in #5118, #5119, #5120, #5121, #5122 and #5123.

While that PR gets merged, this PR will be left as a draft. The reason for that is that the link to the usage guidelines may change until #5179 is complete.

Sources

Does not qualify.

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 label +stable-nominated

This patch adds a new macro that can be used for declaring constants
when these are known to possibly change upstream across target OS/ABI
versions.
@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 18, 2026
@dybucc

dybucc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of having a simpler doc comment.

@dybucc dybucc closed this Jun 19, 2026
@tgross35 tgross35 removed the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants