mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Stabilize bench_black_box
This commit is contained in:
parent
199fe1d169
commit
9ad2f00f6a
@ -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::*;
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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)
|
||||
|
@ -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)]
|
||||
|
@ -351,7 +351,6 @@
|
||||
#![feature(trace_macros)]
|
||||
//
|
||||
// Only used in tests/benchmarks:
|
||||
#![feature(bench_black_box)]
|
||||
//
|
||||
// Only for const-ness:
|
||||
#![feature(const_io_structs)]
|
||||
|
@ -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)]
|
||||
|
@ -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")]
|
||||
|
||||
|
@ -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>) {
|
||||
|
@ -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)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
// run-pass
|
||||
#![feature(const_discriminant)]
|
||||
#![feature(bench_black_box)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use std::mem::{discriminant, Discriminant};
|
||||
|
@ -1,5 +1,5 @@
|
||||
// run-pass
|
||||
#![feature(bench_black_box)]
|
||||
|
||||
use std::hint;
|
||||
|
||||
struct U16(u16);
|
||||
|
@ -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;
|
||||
|
@ -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)]
|
||||
|
@ -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;
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
// run-fail
|
||||
// error-pattern: HWAddressSanitizer: tag-mismatch
|
||||
|
||||
#![feature(bench_black_box)]
|
||||
|
||||
use std::hint::black_box;
|
||||
|
||||
fn main() {
|
||||
|
@ -6,8 +6,6 @@
|
||||
// run-fail
|
||||
// error-pattern: LeakSanitizer: detected memory leaks
|
||||
|
||||
#![feature(bench_black_box)]
|
||||
|
||||
use std::hint::black_box;
|
||||
use std::mem;
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(start)]
|
||||
#![feature(bench_black_box)]
|
||||
|
||||
use std::hint::black_box;
|
||||
use std::mem::MaybeUninit;
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(start)]
|
||||
#![feature(bench_black_box)]
|
||||
#![allow(invalid_value)]
|
||||
|
||||
use std::hint::black_box;
|
||||
|
@ -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) };
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(bench_black_box)]
|
||||
use std::hint::black_box as b;
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user