The function std::hint::black_box is a stable wrapper around the same intrinsic that test::black_box uses, and could replace Criterion's own black_box function on all release channels. This function has been stable since 1.66, meaning that the last three minor versions of Rust are supported.
The function
std::hint::black_box
is a stable wrapper around the same intrinsic thattest::black_box
uses, and could replace Criterion's ownblack_box
function on all release channels. This function has been stable since 1.66, meaning that the last three minor versions of Rust are supported.