diff --git a/tests/rdrand.rs b/tests/rdrand.rs index 4ff85c47..25678683 100644 --- a/tests/rdrand.rs +++ b/tests/rdrand.rs @@ -11,5 +11,10 @@ mod rdrand; #[path = "../src/util.rs"] mod util; -use rdrand::getrandom_inner as getrandom_impl; +// The rdrand implementation has the signature of getrandom_uninit(), but our +// tests expect getrandom_impl() to have the signature of getrandom(). +fn getrandom_impl(dest: &mut [u8]) -> Result<(), Error> { + rdrand::getrandom_inner(unsafe { util::slice_as_uninit_mut(dest) })?; + Ok(()) +} mod common;