Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion library/core/src/ffi/va_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,12 @@ unsafe impl<T> sealed_trait::VaArgSafe for *mut T {}
unsafe impl<T> sealed_trait::VaArgSafe for *const T {}

impl<'f> VaListImpl<'f> {
/// Advance to the next arg.
/// Loads an argument of type `T` from the `va_list` and advance to the next arg.
///
/// # Safety
///
/// - Arg must be within the length of arg list when calling this method.
/// - The memory pointed to by the `va_list` must contain arguments of the correct types and sizes.
#[inline]
pub unsafe fn arg<T: sealed_trait::VaArgSafe>(&mut self) -> T {
// SAFETY: the caller must uphold the safety contract for `va_arg`.
Expand Down
Loading