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:
Yuki Okushi 2022-09-28 13:07:17 +09:00 committed by GitHub
commit 07bb2e6527
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 8 additions and 28 deletions

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() {