From 6fd4f3463f54a7b06189dcc783d5e14593ff7e15 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 12 Aug 2021 00:18:53 +0100 Subject: [PATCH] Allow the use of the deprecated llvm_asm! in black_box --- library/core/src/hint.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index a4924554919b0..ba878ff66a008 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -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(mut dummy: T) -> T { #[cfg(bootstrap)] // SAFETY: the inline assembly is a no-op.