Skip to content

Commit 0b31525

Browse files
committed
Use black_box intrinsic in out-of-stack test
1 parent c7d591d commit 0b31525

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/test/ui/runtime/out-of-stack.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// ignore-emscripten no processes
77
// ignore-sgx no processes
88

9-
#![feature(llvm_asm)]
9+
#![feature(core_intrinsics)]
1010
#![feature(rustc_private)]
1111

1212
#[cfg(unix)]
@@ -16,11 +16,10 @@ use std::env;
1616
use std::process::Command;
1717
use std::thread;
1818

19-
// lifted from the test module
2019
// Inlining to avoid llvm turning the recursive functions into tail calls,
2120
// which doesn't consume stack.
2221
#[inline(always)]
23-
pub fn black_box<T>(dummy: T) { unsafe { llvm_asm!("" : : "r"(&dummy)) } }
22+
pub fn black_box<T>(dummy: T) { std::intrinsics::black_box(dummy); }
2423

2524
fn silent_recurse() {
2625
let buf = [0u8; 1000];

0 commit comments

Comments
 (0)