Skip to content

Commit 3b6b489

Browse files
committed
Document why the volatile read is used
1 parent 1ea57aa commit 3b6b489

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/hint.rs

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ pub fn black_box<T>(dummy: T) -> T {
122122
)
123123
)
124124
)] {
125+
// asm.js and emscripten do not support inline assembly
125126
unsafe {
126127
let ret = crate::ptr::read_volatile(&dummy);
127128
crate::mem::forget(dummy);

0 commit comments

Comments
 (0)