We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfa76c4 commit 24db517Copy full SHA for 24db517
src/libcore/hint.rs
@@ -99,17 +99,17 @@ pub fn spin_loop() {
99
/// This function is a no-op, and does not even read from `dummy`.
100
#[unstable(feature = "test", issue = "27812")]
101
pub fn black_box<T>(dummy: T) -> T {
102
- #[cfg(not(any(target_arch = "asmjs", target_arch = "wasm32")))] {
+ #[cfg(not(target_arch = "asmjs"))] {
103
// we need to "use" the argument in some way LLVM can't
104
// introspect.
105
unsafe { asm!("" : : "r"(&dummy)) }
106
dummy
107
}
108
- #[cfg(any(target_arch = "asmjs", target_arch = "wasm32"))] {
+ #[cfg(target_arch = "asmjs")] {
109
unsafe {
110
let ret = crate::ptr::read_volatile(&dummy);
111
crate::mem::forget(dummy);
112
ret
113
114
- }
+ }
115
0 commit comments