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")]
use std::arch::x86_64::*;

View File

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

View File

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

View File

@ -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)]

View File

@ -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)

View File

@ -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)]

View File

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

View File

@ -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)]

View File

@ -8,7 +8,6 @@
// compile-flags: -C overflow-checks=on -Z query-dep-graph
#![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 = "rpass4")]

View File

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

View File

@ -1,6 +1,5 @@
// run-pass
// 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;
#[derive(Copy, Clone)]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
// Validation makes this fail in the wrong place
// Make sure we find these even with many checks disabled.
//@compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
#![feature(bench_black_box)]
fn main() {
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)]
use std::fmt::Debug;
use std::hint::black_box;

View File

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