diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index c4cb53d6cb7..c00246598c3 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -1332,10 +1332,11 @@ impl MetricMap { /// elimination. /// /// This function is a no-op, and does not even read from `dummy`. -pub fn black_box(dummy: T) { +pub fn black_box(dummy: T) -> T { // we need to "use" the argument in some way LLVM can't // introspect. unsafe {asm!("" : : "r"(&dummy))} + dummy }