Skip to content

Conversation

tgross35
Copy link
Contributor

We no longer need to support gating const behind libc_const_extern_fn, so remove the awkward {const} syntax.

@rustbot label +stable-nominated

@rustbot
Copy link
Collaborator

rustbot commented Sep 23, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in the Android module

cc @maurer

We no longer need to support gating `const` behind
`libc_const_extern_fn`, so remove the awkward `{const}` syntax.
@tgross35 tgross35 force-pushed the simplify-function-macros branch from e2e2a8b to 1483c7c Compare September 23, 2025 06:25
Now that is okay for functions to be always `const`, this macro doesn't
add anything other than the `#[inline]` attribute, which isn't useful
for private functions anyway. Thus, remove the macro and leave its
contents wherever it is used.
@tgross35 tgross35 enabled auto-merge September 23, 2025 06:46
@tgross35 tgross35 added this pull request to the merge queue Sep 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 23, 2025
@tgross35 tgross35 added this pull request to the merge queue Sep 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 23, 2025
@tgross35 tgross35 added this pull request to the merge queue Sep 23, 2025
Merged via the queue into rust-lang:main with commit dcde5cd Sep 23, 2025
50 of 52 checks passed
@tgross35 tgross35 deleted the simplify-function-macros branch September 23, 2025 08:15
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
We no longer need to support gating `const` behind
`libc_const_extern_fn`, so remove the awkward `{const}` syntax.

(backport <rust-lang#4714>)
(cherry picked from commit e860257)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
Now that is okay for functions to be always `const`, this macro doesn't
add anything other than the `#[inline]` attribute, which isn't useful
for private functions anyway. Thus, remove the macro and leave its
contents wherever it is used.

(backport <rust-lang#4714>)
(cherry picked from commit dcde5cd)
@tgross35 tgross35 mentioned this pull request Sep 23, 2025
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
We no longer need to support gating `const` behind
`libc_const_extern_fn`, so remove the awkward `{const}` syntax.

(backport <rust-lang#4714>)
(cherry picked from commit e860257)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
Now that is okay for functions to be always `const`, this macro doesn't
add anything other than the `#[inline]` attribute, which isn't useful
for private functions anyway. Thus, remove the macro and leave its
contents wherever it is used.

(backport <rust-lang#4714>)
(cherry picked from commit dcde5cd)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
We no longer need to support gating `const` behind
`libc_const_extern_fn`, so remove the awkward `{const}` syntax.

(backport <rust-lang#4714>)
(cherry picked from commit e860257)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
Now that is okay for functions to be always `const`, this macro doesn't
add anything other than the `#[inline]` attribute, which isn't useful
for private functions anyway. Thus, remove the macro and leave its
contents wherever it is used.

(backport <rust-lang#4714>)
(cherry picked from commit dcde5cd)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
We no longer need to support gating `const` behind
`libc_const_extern_fn`, so remove the awkward `{const}` syntax.

(backport <rust-lang#4714>)
(cherry picked from commit e860257)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 23, 2025
Now that is okay for functions to be always `const`, this macro doesn't
add anything other than the `#[inline]` attribute, which isn't useful
for private functions anyway. Thus, remove the macro and leave its
contents wherever it is used.

(backport <rust-lang#4714>)
(cherry picked from commit dcde5cd)
github-merge-queue bot pushed a commit that referenced this pull request Sep 23, 2025
We no longer need to support gating `const` behind
`libc_const_extern_fn`, so remove the awkward `{const}` syntax.

(backport <#4714>)
(cherry picked from commit e860257)
github-merge-queue bot pushed a commit that referenced this pull request Sep 23, 2025
Now that is okay for functions to be always `const`, this macro doesn't
add anything other than the `#[inline]` attribute, which isn't useful
for private functions anyway. Thus, remove the macro and leave its
contents wherever it is used.

(backport <#4714>)
(cherry picked from commit dcde5cd)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 23, 2025
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