diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 929c22e4538f..1192b9e164a1 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -122,7 +122,7 @@ pub fn black_box(mut dummy: T) -> T { // SAFETY: the inline assembly is a no-op. unsafe { // FIXME: Cannot use `asm!` because it doesn't support MIPS and other architectures. - llvm_asm!("" : : "r"(&mut dummy)); + llvm_asm!("" : : "r"(&mut dummy) : "memory" : "volatile"); } dummy