rust/src
bors 4f1be92153 Auto merge of #129753 - folkertdev:stabilize-const-extern-fn, r=RalfJung
stabilize `const_extern_fn`

closes https://github.com/rust-lang/rust/issues/64926

tracking issue: https://github.com/rust-lang/rust/issues/64926
reference PR: https://github.com/rust-lang/reference/pull/1596

## Stabilizaton Report

### Summary

Using `const extern "Rust"` and `const extern "C"` was already stabilized (since version 1.62.0, see https://github.com/rust-lang/rust/pull/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`
2024-09-14 23:47:59 +00:00
..
bootstrap Auto merge of #130332 - Zalathar:rollup-eq0qvvy, r=Zalathar 2024-09-14 04:37:41 +00:00
ci Auto merge of #129974 - cuviper:ci-llvm-19, r=Mark-Simulacrum 2024-09-14 18:44:23 +00:00
doc Rollup merge of #129367 - madsmtm:fix-apple-aarch64-deployment-targets, r=jieyouxu 2024-09-12 20:37:15 +10:00
etc Remove unused option from x.py 2024-09-07 10:35:23 +05:30
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc Rename and reorder lots of lifetimes. 2024-09-13 15:46:20 +10:00
llvm-project@4b8d29c585 Update LLVM to 19 327ca6c 2024-09-11 07:59:27 +08:00
rustdoc-json-types rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint 2024-09-01 23:58:08 +03:00
tools Auto merge of #129753 - folkertdev:stabilize-const-extern-fn, r=RalfJung 2024-09-14 23:47:59 +00:00
README.md
stage0 bump stage0 2024-09-04 03:13:55 +01:00
version Bump to 1.83 2024-08-30 19:58:04 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.