Stabilize bench_black_box

This commit is contained in:
Urgau 2022-09-24 12:34:56 +02:00
parent 199fe1d169
commit 9ad2f00f6a
23 changed files with 8 additions and 28 deletions

View file

@ -1,4 +1,4 @@
#![feature(core_intrinsics, generators, generator_trait, is_sorted, bench_black_box)] #![feature(core_intrinsics, generators, generator_trait, is_sorted)]
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*; use std::arch::x86_64::*;

View file

@ -3,7 +3,7 @@
// Run-time: // Run-time:
// status: 0 // status: 0
#![feature(bench_black_box, const_black_box, core_intrinsics, start)] #![feature(const_black_box, core_intrinsics, start)]
#![no_std] #![no_std]

View file

@ -1,7 +1,6 @@
#![deny(rustc::untranslatable_diagnostic)] #![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)] #![deny(rustc::diagnostic_outside_of_impl)]
#![feature(allow_internal_unstable)] #![feature(allow_internal_unstable)]
#![feature(bench_black_box)]
#![feature(extend_one)] #![feature(extend_one)]
#![cfg_attr(bootstrap, feature(let_else))] #![cfg_attr(bootstrap, feature(let_else))]
#![feature(min_specialization)] #![feature(min_specialization)]

View file

@ -41,7 +41,6 @@
#![feature(pointer_is_aligned)] #![feature(pointer_is_aligned)]
#![feature(slice_flatten)] #![feature(slice_flatten)]
#![feature(thin_box)] #![feature(thin_box)]
#![feature(bench_black_box)]
#![feature(strict_provenance)] #![feature(strict_provenance)]
#![feature(once_cell)] #![feature(once_cell)]
#![feature(drain_keep_rest)] #![feature(drain_keep_rest)]

View file

@ -217,7 +217,7 @@ pub fn spin_loop() {
/// ///
/// [`std::convert::identity`]: crate::convert::identity /// [`std::convert::identity`]: crate::convert::identity
#[inline] #[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")] #[rustc_const_unstable(feature = "const_black_box", issue = "none")]
pub const fn black_box<T>(dummy: T) -> T { pub const fn black_box<T>(dummy: T) -> T {
crate::intrinsics::black_box(dummy) crate::intrinsics::black_box(dummy)

View file

@ -2,7 +2,6 @@
#![feature(array_chunks)] #![feature(array_chunks)]
#![feature(array_methods)] #![feature(array_methods)]
#![feature(array_windows)] #![feature(array_windows)]
#![feature(bench_black_box)]
#![feature(bigint_helper_methods)] #![feature(bigint_helper_methods)]
#![feature(cell_update)] #![feature(cell_update)]
#![feature(const_assume)] #![feature(const_assume)]

View file

@ -351,7 +351,6 @@
#![feature(trace_macros)] #![feature(trace_macros)]
// //
// Only used in tests/benchmarks: // Only used in tests/benchmarks:
#![feature(bench_black_box)]
// //
// Only for const-ness: // Only for const-ness:
#![feature(const_io_structs)] #![feature(const_io_structs)]

View file

@ -15,7 +15,6 @@
#![unstable(feature = "test", issue = "50297")] #![unstable(feature = "test", issue = "50297")]
#![doc(test(attr(deny(warnings))))] #![doc(test(attr(deny(warnings))))]
#![feature(bench_black_box)]
#![feature(internal_output_capture)] #![feature(internal_output_capture)]
#![feature(staged_api)] #![feature(staged_api)]
#![feature(process_exitcode_internals)] #![feature(process_exitcode_internals)]

View file

@ -8,7 +8,6 @@
// compile-flags: -C overflow-checks=on -Z query-dep-graph // compile-flags: -C overflow-checks=on -Z query-dep-graph
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![feature(bench_black_box)]
#![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass2")] #![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass2")]
#![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass4")] #![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass4")]

View file

@ -1,7 +1,7 @@
// compile-flags: -O // compile-flags: -O
// build-pass // build-pass
#![feature(allocator_api, bench_black_box)] #![feature(allocator_api)]
#[inline(never)] #[inline(never)]
pub fn by_ref(node: &mut Box<[u8; 1], &std::alloc::Global>) { pub fn by_ref(node: &mut Box<[u8; 1], &std::alloc::Global>) {

View file

@ -1,6 +1,5 @@
// run-pass // run-pass
// Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32. // Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32.
#![feature(bench_black_box)]
use std::hint::black_box; use std::hint::black_box;
#[derive(Copy, Clone)] #[derive(Copy, Clone)]

View file

@ -1,6 +1,5 @@
// run-pass // run-pass
#![feature(const_discriminant)] #![feature(const_discriminant)]
#![feature(bench_black_box)]
#![allow(dead_code)] #![allow(dead_code)]
use std::mem::{discriminant, Discriminant}; use std::mem::{discriminant, Discriminant};

View file

@ -1,5 +1,5 @@
// run-pass // run-pass
#![feature(bench_black_box)]
use std::hint; use std::hint;
struct U16(u16); struct U16(u16);

View file

@ -4,8 +4,6 @@
// needs-unwind // needs-unwind
// only-linux // only-linux
#![feature(bench_black_box)]
use std::hint::black_box; use std::hint::black_box;
use std::mem::forget; use std::mem::forget;
use std::panic::catch_unwind; use std::panic::catch_unwind;

View file

@ -7,7 +7,6 @@
// ignore-sgx no processes // ignore-sgx no processes
// ignore-android: FIXME(#85261) // ignore-android: FIXME(#85261)
#![feature(bench_black_box)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(never_type)] #![feature(never_type)]
#![feature(panic_always_abort)] #![feature(panic_always_abort)]

View file

@ -5,9 +5,7 @@
// //
// run-fail // run-fail
// error-pattern: AddressSanitizer: stack-buffer-overflow // error-pattern: AddressSanitizer: stack-buffer-overflow
// error-pattern: 'xs' (line 15) <== Memory access at offset // error-pattern: 'xs' (line 13) <== Memory access at offset
#![feature(bench_black_box)]
use std::hint::black_box; use std::hint::black_box;

View file

@ -10,8 +10,6 @@
// run-fail // run-fail
// error-pattern: HWAddressSanitizer: tag-mismatch // error-pattern: HWAddressSanitizer: tag-mismatch
#![feature(bench_black_box)]
use std::hint::black_box; use std::hint::black_box;
fn main() { fn main() {

View file

@ -6,8 +6,6 @@
// run-fail // run-fail
// error-pattern: LeakSanitizer: detected memory leaks // error-pattern: LeakSanitizer: detected memory leaks
#![feature(bench_black_box)]
use std::hint::black_box; use std::hint::black_box;
use std::mem; use std::mem;

View file

@ -17,7 +17,6 @@
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
#![feature(start)] #![feature(start)]
#![feature(bench_black_box)]
use std::hint::black_box; use std::hint::black_box;
use std::mem::MaybeUninit; use std::mem::MaybeUninit;

View file

@ -16,7 +16,6 @@
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
#![feature(start)] #![feature(start)]
#![feature(bench_black_box)]
#![allow(invalid_value)] #![allow(invalid_value)]
use std::hint::black_box; use std::hint::black_box;

View file

@ -1,7 +1,7 @@
// Validation makes this fail in the wrong place // Validation makes this fail in the wrong place
// Make sure we find these even with many checks disabled. // Make sure we find these even with many checks disabled.
//@compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation //@compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
#![feature(bench_black_box)]
fn main() { fn main() {
let b = unsafe { std::mem::transmute::<u8, bool>(2) }; let b = unsafe { std::mem::transmute::<u8, bool>(2) };

View file

@ -1,4 +1,4 @@
#![feature(stmt_expr_attributes, bench_black_box)] #![feature(stmt_expr_attributes)]
#![allow(arithmetic_overflow)] #![allow(arithmetic_overflow)]
use std::fmt::Debug; use std::fmt::Debug;
use std::hint::black_box; use std::hint::black_box;

View file

@ -1,4 +1,3 @@
#![feature(bench_black_box)]
use std::hint::black_box as b; use std::hint::black_box as b;
fn main() { fn main() {