Hi Jonas,
Le 21/11/2023 à 14:58, Jonas Smedegaard a écrit :
It is my understanding that the feature "real_blackbox" is only possible
to build with a bleeding-edge "nightly" rustc compiler. In other words
that feature is inherently unstable.
I sent that bug after checking that `black_box` was now a stable rust
API, but unfortunately, digging out a bit more I realized that's not the
end of the story here:
* black_box is stable (as of 1.66.0) as std::hint::black_box
* criterion relies on test::black_box for its "real_blackbox" feature,
which is still nightly-only
So while in theory it looked good, in practice it is not.
The good news here is that there's a PR upstream[1] for switching to
std::hint::black_box so it will likely all be fixed eventually, even
though there hasn't been much activity lately...
Cheers,
Arnaud
[1] https://github.com/bheisler/criterion.rs/pull/701