Skip to content

Commit f1f8e53

Browse files
committed
Merge remote-tracking branch 'tarcieri/restore-1.60-msrv' into develop
2 parents 6dcd695 + 1fa4054 commit f1f8e53

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- stable
1313
- beta
1414
- nightly
15-
- 1.41.0
15+
- 1.60.0
1616
steps:
1717
- name: checkout
1818
uses: actions/checkout@v2

src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ impl Not for Choice {
219219
/// Note: Rust's notion of "volatile" is subject to change over time. While this
220220
/// code may break in a non-destructive way in the future, “constant-time” code
221221
/// is a continually moving target, and this is better than doing nothing.
222+
#[cfg(not(feature = "core_hint_black_box"))]
222223
#[inline(never)]
223224
fn black_box<T: Copy>(input: T) -> T {
224225
unsafe {
@@ -996,7 +997,7 @@ impl<T: Copy> BlackBox<T> {
996997
/// Constructs a new instance of `BlackBox` which will wrap the specified value.
997998
///
998999
/// All access to the inner value will be mediated by a `black_box` optimization barrier.
999-
pub const fn new(value: T) -> Self {
1000+
pub fn new(value: T) -> Self {
10001001
Self(value)
10011002
}
10021003

0 commit comments

Comments
 (0)