Allow the use of the deprecated llvm_asm! in black_box

This commit is contained in:
Amanieu d'Antras 2021-08-12 00:18:53 +01:00
parent 4dd933cdc2
commit 6fd4f3463f

View File

@ -155,6 +155,7 @@ pub fn spin_loop() {
#[inline]
#[unstable(feature = "bench_black_box", issue = "64102")]
#[cfg_attr(not(bootstrap), allow(unused_mut))]
#[cfg_attr(bootstrap, allow(deprecated))]
pub fn black_box<T>(mut dummy: T) -> T {
#[cfg(bootstrap)]
// SAFETY: the inline assembly is a no-op.