diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs index cceb186b31e79..0c26cf217561a 100644 --- a/library/core/src/ffi/va_list.rs +++ b/library/core/src/ffi/va_list.rs @@ -253,7 +253,12 @@ unsafe impl sealed_trait::VaArgSafe for *mut T {} unsafe impl 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(&mut self) -> T { // SAFETY: the caller must uphold the safety contract for `va_arg`.