Uh oh!
There was an error while loading. Please reload this page.
Stablize const_extern_fn for "Rust" and "C" - #95346
Merged
Merged
Conversation
All other ABIs are left unstable for now. cc rust-lang#64926
rust-highfive
commented
Mar 26, 2022
Contributor
(rust-highfive has picked a reviewer for you, use r? to override) |
michaelwoerister
commented
Mar 31, 2022
Member
I don't think I have the necessary context here. r? @pnkfelix |
pnkfelix
commented
Apr 14, 2022
Contributor
based on #64926 (comment) and #64926 (comment), this is fine. @bors r+ rollup |
bors
commented
Apr 14, 2022
Collaborator
📌 Commit 8035796 has been approved by |
ehuss
commented
Apr 15, 2022
Contributor
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
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. Closesrust-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` closesrust-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-actionsBot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Sep 16, 2024
stabilize `const_extern_fn` closesrust-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`
Kobzol pushed a commit
to Kobzol/portable-simd
that referenced
this pull request
Feb 3, 2026
stabilize `const_extern_fn` closesrust-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`
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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