Skip to content

Commit 0b69ff5

Browse files
committed
Defer codegen for the VaList Drop impl to actual uses
This allows compiling libcore with codegen backends that don't actually implement VaList like cg_clif.
1 parent 76be1cc commit 0b69ff5

2 files changed

Lines changed: 1 addition & 25 deletions

File tree

compiler/rustc_codegen_cranelift/patches/0028-stdlib-Ensure-va_end-doesn-t-get-emitted-unless-VaList-is-a.patch

Lines changed: 0 additions & 25 deletions
This file was deleted.

library/core/src/ffi/va_list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ impl<'f> const Clone for VaList<'f> {
256256

257257
#[rustc_const_unstable(feature = "const_c_variadic", issue = "151787")]
258258
impl<'f> const Drop for VaList<'f> {
259+
#[inline]
259260
fn drop(&mut self) {
260261
// SAFETY: this variable argument list is being dropped, so won't be read from again.
261262
unsafe { va_end(self) }

0 commit comments

Comments
 (0)