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
This commit is contained in:
commit
07bb2e6527
23 changed files with 8 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue