Skip to content

Commit ecb3602

Browse files
authored
Rollup merge of #102232 - Urgau:stabilize-bench_black_box, r=TaKO8Ki
Stabilize bench_black_box This PR stabilize `feature(bench_black_box)`. ```rust pub fn black_box<T>(dummy: T) -> T; ``` The FCP was completed in rust-lang/rust#64102. `@rustbot` label +T-libs-api -T-libs
2 parents 5abb4fe + 4184706 commit ecb3602

File tree

5 files changed

+1
-5
lines changed

5 files changed

+1
-5
lines changed

alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#![feature(pointer_is_aligned)]
4242
#![feature(slice_flatten)]
4343
#![feature(thin_box)]
44-
#![feature(bench_black_box)]
4544
#![feature(strict_provenance)]
4645
#![feature(once_cell)]
4746
#![feature(drain_keep_rest)]

core/src/hint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pub fn spin_loop() {
217217
///
218218
/// [`std::convert::identity`]: crate::convert::identity
219219
#[inline]
220-
#[unstable(feature = "bench_black_box", issue = "64102")]
220+
#[stable(feature = "bench_black_box", since = "CURRENT_RUSTC_VERSION")]
221221
#[rustc_const_unstable(feature = "const_black_box", issue = "none")]
222222
pub const fn black_box<T>(dummy: T) -> T {
223223
crate::intrinsics::black_box(dummy)

core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(array_chunks)]
33
#![feature(array_methods)]
44
#![feature(array_windows)]
5-
#![feature(bench_black_box)]
65
#![feature(bigint_helper_methods)]
76
#![feature(cell_update)]
87
#![feature(const_assume)]

std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@
348348
#![feature(trace_macros)]
349349
//
350350
// Only used in tests/benchmarks:
351-
#![feature(bench_black_box)]
352351
//
353352
// Only for const-ness:
354353
#![feature(const_io_structs)]

test/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#![unstable(feature = "test", issue = "50297")]
1717
#![doc(test(attr(deny(warnings))))]
18-
#![feature(bench_black_box)]
1918
#![feature(internal_output_capture)]
2019
#![feature(staged_api)]
2120
#![feature(process_exitcode_internals)]

0 commit comments

Comments
 (0)