-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stablize const_extern_fn
for "Rust" and "C"
#95346
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All other ABIs are left unstable for now. cc rust-lang#64926
(rust-highfive has picked a reviewer for you, use r? to override) |
rustbot
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Mar 26, 2022
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Mar 26, 2022
I don't think I have the necessary context here. r? @pnkfelix |
based on #64926 (comment) and #64926 (comment), this is fine. @bors r+ rollup |
📌 Commit 8035796 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Apr 14, 2022
Would you be willing to update the documentation here to note the changes here? |
fee1-dead
added a commit
to fee1-dead-contrib/rust
that referenced
this pull request
Apr 15, 2022
… r=pnkfelix Stablize `const_extern_fn` for "Rust" and "C" All other ABIs are left unstable for now. cc rust-lang#64926
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Apr 15, 2022
… r=pnkfelix Stablize `const_extern_fn` for "Rust" and "C" All other ABIs are left unstable for now. cc rust-lang#64926
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Apr 15, 2022
… r=pnkfelix Stablize `const_extern_fn` for "Rust" and "C" All other ABIs are left unstable for now. cc rust-lang#64926
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Apr 15, 2022
… r=pnkfelix Stablize `const_extern_fn` for "Rust" and "C" All other ABIs are left unstable for now. cc rust-lang#64926
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Apr 15, 2022
… r=pnkfelix Stablize `const_extern_fn` for "Rust" and "C" All other ABIs are left unstable for now. cc rust-lang#64926
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 17, 2022
Rollup of 6 pull requests Successful merges: - rust-lang#95346 (Stablize `const_extern_fn` for "Rust" and "C") - rust-lang#95933 (htmldocck: Compare HTML tree instead of plain text html) - rust-lang#96105 (Make the debug output for `TargetSelection` less verbose) - rust-lang#96112 (Strict provenance lint diagnostics improvements) - rust-lang#96119 (update Miri) - rust-lang#96124 (to_digit tweak) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Aaron1011
added a commit
to Aaron1011/libc
that referenced
this pull request
May 10, 2022
This was recently stabilized in rust-lang/rust#95346, and will be included in the 1.62.0 release. This `const-extern-fn` feature can still be used to enable these definitions on older compiler versions.
This was referenced Jun 8, 2022
bors
added a commit
to rust-lang/libc
that referenced
this pull request
Jun 9, 2022
Enable `libc_const_extern_fn` implicitly from Rust 1.62 const_extern_fn for "C" has been stabilized since 1.62: rust-lang/rust#95346 This enables the const-extern-fn feature implicitly from 1.62, but leaves the crate feature as-is for compatibility and old nightlies. Closes #2785
1 task
Mark-Simulacrum
added
the
relnotes
Marks issues that should be documented in the release notes of the next release.
label
Sep 9, 2022
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Sep 9, 2022
…acrum Add `const_extern_fn` to 1.62 release notes. Adds rust-lang#95346 which did not get tagged with relnotes. Closes rust-lang#101443
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 14, 2024
…, r=RalfJung stabilize `const_extern_fn` closes rust-lang#64926 tracking issue: rust-lang#64926 reference PR: rust-lang/reference#1596 ## Stabilizaton Report ### Summary Using `const extern "Rust"` and `const extern "C"` was already stabilized (since version 1.62.0, see rust-lang#95346). This PR stabilizes the other calling conventions: it is now possible to write `const unsafe extern "calling-convention" fn` and `const extern "calling-convention" fn` for any supported calling convention: ```rust const extern "C-unwind" fn foo1(val: u8) -> u8 { val + 1} const extern "stdcall" fn foo2(val: u8) -> u8 { val + 1} const unsafe extern "C-unwind" fn bar1(val: bool) -> bool { !val } const unsafe extern "stdcall" fn bar2(val: bool) -> bool { !val } ``` This can be used to const-ify an `extern fn`, or conversely, to make a `const fn` callable from external code. r? T-lang cc `@RalfJung`
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Sep 16, 2024
stabilize `const_extern_fn` closes rust-lang/rust#64926 tracking issue: rust-lang/rust#64926 reference PR: rust-lang/reference#1596 ## Stabilizaton Report ### Summary Using `const extern "Rust"` and `const extern "C"` was already stabilized (since version 1.62.0, see rust-lang/rust#95346). This PR stabilizes the other calling conventions: it is now possible to write `const unsafe extern "calling-convention" fn` and `const extern "calling-convention" fn` for any supported calling convention: ```rust const extern "C-unwind" fn foo1(val: u8) -> u8 { val + 1} const extern "stdcall" fn foo2(val: u8) -> u8 { val + 1} const unsafe extern "C-unwind" fn bar1(val: bool) -> bool { !val } const unsafe extern "stdcall" fn bar2(val: bool) -> bool { !val } ``` This can be used to const-ify an `extern fn`, or conversely, to make a `const fn` callable from external code. r? T-lang cc `@RalfJung`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
relnotes
Marks issues that should be documented in the release notes of the next release.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All other ABIs are left unstable for now.
cc #64926