Skip to content

Commit

Permalink
Change new black_box impl to also be #[inline(never)].
Browse files Browse the repository at this point in the history
  • Loading branch information
isislovecruft committed Feb 27, 2023
1 parent 1ac233f commit 6410953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ fn black_box(input: u8) -> u8 {
}

#[cfg(feature = "core_hint_black_box")]
#[inline]
#[inline(never)]
fn black_box(input: u8) -> u8 {
debug_assert!((input == 0u8) | (input == 1u8));
core::hint::black_box(input)
Expand Down

0 comments on commit 6410953

Please sign in to comment.