about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-09-28 13:07:17 +0900
committerGitHub <noreply@github.com>2022-09-28 13:07:17 +0900
commit07bb2e65276d21ef97a6bdbcfdd74cfce47baa37 (patch)
tree9ad2f332441e8bdd9001f346e3c0d042b9a53a85 /library
parent49bc6684932b2a11b69cc0b037b2636e90bc2b22 (diff)
parent9ad2f00f6a9ba359f35b270162a7ca6c412876eb (diff)
downloadrust-07bb2e65276d21ef97a6bdbcfdd74cfce47baa37.tar.gz
rust-07bb2e65276d21ef97a6bdbcfdd74cfce47baa37.zip
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 https://github.com/rust-lang/rust/issues/64102.

`@rustbot` label +T-libs-api -T-libs
Diffstat (limited to 'library')
-rw-r--r--library/alloc/tests/lib.rs1
-rw-r--r--library/core/src/hint.rs2
-rw-r--r--library/core/tests/lib.rs1
-rw-r--r--library/std/src/lib.rs1
-rw-r--r--library/test/src/lib.rs1
5 files changed, 1 insertions, 5 deletions
diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs
index 55aced5106c..f30ebd77e24 100644
--- a/library/alloc/tests/lib.rs
+++ b/library/alloc/tests/lib.rs
@@ -41,7 +41,6 @@
 #![feature(pointer_is_aligned)]
 #![feature(slice_flatten)]
 #![feature(thin_box)]
-#![feature(bench_black_box)]
 #![feature(strict_provenance)]
 #![feature(once_cell)]
 #![feature(drain_keep_rest)]
diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs
index 764e2796202..f9267371aa7 100644
--- a/library/core/src/hint.rs
+++ b/library/core/src/hint.rs
@@ -217,7 +217,7 @@ pub fn spin_loop() {
 ///
 /// [`std::convert::identity`]: crate::convert::identity
 #[inline]
-#[unstable(feature = "bench_black_box", issue = "64102")]
+#[stable(feature = "bench_black_box", since = "CURRENT_RUSTC_VERSION")]
 #[rustc_const_unstable(feature = "const_black_box", issue = "none")]
 pub const fn black_box<T>(dummy: T) -> T {
     crate::intrinsics::black_box(dummy)
diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs
index 46f603eaeba..6d58ed9743d 100644
--- a/library/core/tests/lib.rs
+++ b/library/core/tests/lib.rs
@@ -2,7 +2,6 @@
 #![feature(array_chunks)]
 #![feature(array_methods)]
 #![feature(array_windows)]
-#![feature(bench_black_box)]
 #![feature(bigint_helper_methods)]
 #![feature(cell_update)]
 #![feature(const_assume)]
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index ac5d0384d43..64b62fd3bba 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -348,7 +348,6 @@
 #![feature(trace_macros)]
 //
 // Only used in tests/benchmarks:
-#![feature(bench_black_box)]
 //
 // Only for const-ness:
 #![feature(const_io_structs)]
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index 3b7193adcc7..33c6ea58532 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -15,7 +15,6 @@
 
 #![unstable(feature = "test", issue = "50297")]
 #![doc(test(attr(deny(warnings))))]
-#![feature(bench_black_box)]
 #![feature(internal_output_capture)]
 #![feature(staged_api)]
 #![feature(process_exitcode_internals)]