Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ rand = { version = "0.8" }
const-generics = []
# DEPRECATED: As of 2.5.1, this feature does nothing.
core_hint_black_box = []
default = ["std", "i128"]
default = ["std", "i128", "const-generics"]
std = []
i128 = []
# DEPRECATED: As of 2.4.1, this feature does nothing.
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ impl Not for Choice {
/// 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.
#[inline(never)]
#[cfg(not(feature = "core_hint_black_box"))]
fn black_box<T: Copy>(input: T) -> T {
unsafe {
// Optimization barrier
Expand Down