diff --git a/rust/cli/src/lib.rs b/rust/cli/src/lib.rs index 0a2631e39..0269c5a17 100644 --- a/rust/cli/src/lib.rs +++ b/rust/cli/src/lib.rs @@ -36,6 +36,11 @@ use std::ffi::c_void; use std::os::raw::{c_char, c_int}; /// Match the C `--list` stdin callback without crossing any file-I/O state. +/// +/// # Safety +/// +/// `file_name` must point to a valid NUL-terminated C string, as required by +/// the original C callback contract. `_opaque` is ignored. #[cfg(feature = "cli")] #[no_mangle] pub unsafe extern "C" fn FIO_listFileIsStdin(