Skip to content

benches: use std::hint::black_box - #334

Merged
krisztianfekete merged 1 commit into
prometheus:masterfrom
krisztianfekete:ci/bench-black-box
Aug 4, 2026
Merged

benches: use std::hint::black_box#334
krisztianfekete merged 1 commit into
prometheus:masterfrom
krisztianfekete:ci/bench-black-box

Conversation

@krisztianfekete

Copy link
Copy Markdown
Collaborator

criterion 0.8 deprecates criterion::black_box in favour of the std function it re-exports, see failures in https://github.com/prometheus/client_rust/actions/runs/30914192889/job/92008038237?pr=333

This PR switches to std::hint::black_box, which is stable since 1.66 and works with both criterion 0.5 and 0.8 thus unblocking #333

Signed-off-by: krisztianfekete <git@krisztianfekete.org>
@krisztianfekete
krisztianfekete added this pull request to the merge queue Aug 4, 2026
Merged via the queue into prometheus:master with commit 0053b6d Aug 4, 2026
10 checks passed
@krisztianfekete
krisztianfekete deleted the ci/bench-black-box branch August 4, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants