Skip to content

Commit 985cc02

Browse files
authored
Rollup merge of rust-lang#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 rust-lang#64102. `@rustbot` label +T-libs-api -T-libs
2 parents 6784b45 + 5269806 commit 985cc02

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

tests/fail/invalid_bool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Validation makes this fail in the wrong place
22
// Make sure we find these even with many checks disabled.
33
//@compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
4-
#![feature(bench_black_box)]
4+
55

66
fn main() {
77
let b = unsafe { std::mem::transmute::<u8, bool>(2) };

tests/pass/float.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(stmt_expr_attributes, bench_black_box)]
1+
#![feature(stmt_expr_attributes)]
22
#![allow(arithmetic_overflow)]
33
use std::fmt::Debug;
44
use std::hint::black_box;

tests/pass/u128.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(bench_black_box)]
21
use std::hint::black_box as b;
32

43
fn main() {

0 commit comments

Comments
 (0)