From f7ccf22549905ba6262eadc2c9aada63d3d96852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Cig=C3=A1nek?= Date: Mon, 24 Jun 2024 10:17:54 +0200 Subject: [PATCH] Don't define black_box when core_hint_black_box feature enabled --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index b6e42c4..0a6ce0f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -219,6 +219,7 @@ impl Not for Choice { /// Note: Rust's notion of "volatile" is subject to change over time. While this /// code may break in a non-destructive way in the future, “constant-time” code /// is a continually moving target, and this is better than doing nothing. +#[cfg(not(feature = "core_hint_black_box"))] #[inline(never)] fn black_box(input: T) -> T { unsafe {