1
Fork 0

Document why the volatile read is used

This commit is contained in:
gnzlbg 2019-03-26 13:43:57 +01:00
parent 1ea57aa3f9
commit 3b6b4899bf

View file

@ -122,6 +122,7 @@ pub fn black_box<T>(dummy: T) -> T {
)
)
)] {
// asm.js and emscripten do not support inline assembly
unsafe {
let ret = crate::ptr::read_volatile(&dummy);
crate::mem::forget(dummy);