Skip to content

Commit

Permalink
Unrolled build for rust-lang#136005
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#136005 - BLANKatGITHUB:library, r=RalfJung

ports last few library files to new intrinsic style

This pr ports the last 2 library files to new intrinsic style this pr is part of issue rust-lang#132735
  • Loading branch information
rust-timer authored Jan 26, 2025
2 parents 6fb0358 + 72e5149 commit a98f116
Show file tree
Hide file tree
Showing 2 changed files with 957 additions and 677 deletions.
34 changes: 22 additions & 12 deletions library/core/src/ffi/va_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,28 @@ impl<'f> Drop for VaListImpl<'f> {
}
}

extern "rust-intrinsic" {
/// Destroy the arglist `ap` after initialization with `va_start` or
/// `va_copy`.
#[rustc_nounwind]
fn va_end(ap: &mut VaListImpl<'_>);
/// Destroy the arglist `ap` after initialization with `va_start` or
/// `va_copy`.
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[rustc_nounwind]
unsafe fn va_end(_ap: &mut VaListImpl<'_>) {
unreachable!()
}

/// Copies the current location of arglist `src` to the arglist `dst`.
#[rustc_nounwind]
fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);
/// Copies the current location of arglist `src` to the arglist `dst`.
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[rustc_nounwind]
unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>) {
unreachable!()
}

/// Loads an argument of type `T` from the `va_list` `ap` and increment the
/// argument `ap` points to.
#[rustc_nounwind]
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
/// argument `ap` points to.
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[rustc_nounwind]
unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T {
unreachable!()
}
Loading

0 comments on commit a98f116

Please sign in to comment.