rust/library
Jacob Pratt 494c6da389
Rollup merge of #150601 - folkertdev:c-variadic-const-eval, r=RalfJung
support c-variadic functions in `rustc_const_eval`

tracking issue: https://github.com/rust-lang/rust/issues/44930

The new `GlobalAlloc::VaList` is used to create an `AllocId` that represents the variable argument list of a frame. The allocation itself does not store any data, all we need is the unique identifier.

The actual variable argument list is stored in `Memory`, and keyed by the `AllocId`. The `Frame` also stores this `AllocId`, so that when a frame is popped, it can deallocate the variable arguments.

At "runtime" a `VaList` value stores a pointer to the global allocation in its first bytes. The provenance on this pointer can be used to retrieve its `AllocId`, and the offset of the pointer is used to store the index of the next argument to read from the variable argument list.

Miri does not yet support `va_arg`, but I think that can be done separetely?

r? @RalfJung
cc @workingjubilee
2026-02-16 04:28:56 -05:00
..
alloc Auto merge of #152605 - scottmcm:box-drop-alignment, r=Mark-Simulacrum 2026-02-15 13:38:45 +00:00
alloctests Rollup merge of #145024 - Kmeakin:km/optimize-slice-index/v3, r=Mark-Simulacrum 2026-02-14 22:11:52 +01:00
backtrace@28ec93b503 Update backtrace 2026-01-26 10:57:35 +00:00
compiler-builtins libm: Fix tests for lgamma 2026-02-09 04:32:04 -06:00
core Rollup merge of #150601 - folkertdev:c-variadic-const-eval, r=RalfJung 2026-02-16 04:28:56 -05:00
coretests unify and deduplicate floats 2026-02-15 18:00:41 +00:00
panic_abort Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
panic_unwind Remove unused features in library 2026-02-13 09:25:50 +08:00
portable-simd Merge commit 'd9aae8cc54' into sync-from-portable-simd-2026-01-28 2026-01-28 00:56:52 -05:00
proc_macro inline SameThread and CrossThread 2026-02-13 11:24:50 +00:00
profiler_builtins Fix profiler_builtins build script to handle full path to profiler lib 2025-04-11 16:57:38 +02:00
rtstartup Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc-std-workspace-alloc Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
rustc-std-workspace-core Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
rustc-std-workspace-std Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
std unify and deduplicate floats 2026-02-15 18:00:41 +00:00
std_detect Remove or allow unused features in library doc and tests 2026-02-13 09:27:16 +08:00
stdarch Rollup merge of #152188 - cuviper:placeholder-stdarch, r=Mark-Simulacrum 2026-02-14 23:17:40 -05:00
sysroot compiler-builtins: Remove the no-f16-f128 feature 2026-01-11 07:02:27 -06:00
test Remove unused features in library 2026-02-13 09:25:50 +08:00
unwind Rollup merge of #152472 - lizan:wasm, r=Mark-Simulacrum 2026-02-14 23:17:41 -05:00
windows_link Update windows bindings in std 2026-01-26 10:59:16 +00:00
Cargo.lock Rollup merge of #151660 - fmease:bump-backtrace-demangler-alt, r=tgross35 2026-01-28 21:10:51 +01:00
Cargo.toml Update windows bindings in std 2026-01-26 10:59:16 +00:00