File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2526,7 +2526,7 @@ mod bitv_bench {
25262526 for _ in range ( 0 u, 100 ) {
25272527 bitv |= 1 << ( ( r. next_u32 ( ) as uint ) % u32:: BITS ) ;
25282528 }
2529- black_box ( & bitv)
2529+ black_box ( & bitv) ;
25302530 } ) ;
25312531 }
25322532
@@ -2538,7 +2538,7 @@ mod bitv_bench {
25382538 for _ in range ( 0 u, 100 ) {
25392539 bitv. set ( ( r. next_u32 ( ) as uint ) % BENCH_BITS , true ) ;
25402540 }
2541- black_box ( & bitv)
2541+ black_box ( & bitv) ;
25422542 } ) ;
25432543 }
25442544
Original file line number Diff line number Diff line change @@ -2841,7 +2841,7 @@ mod bench {
28412841 let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb" ;
28422842
28432843 b. iter ( || {
2844- for ch in s. chars ( ) { black_box ( ch) }
2844+ for ch in s. chars ( ) { black_box ( ch) ; }
28452845 } ) ;
28462846 }
28472847
@@ -2869,7 +2869,7 @@ mod bench {
28692869 let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb" ;
28702870
28712871 b. iter ( || {
2872- for ch in s. chars ( ) . rev ( ) { black_box ( ch) }
2872+ for ch in s. chars ( ) . rev ( ) { black_box ( ch) ; }
28732873 } ) ;
28742874 }
28752875
Original file line number Diff line number Diff line change @@ -1332,10 +1332,11 @@ impl MetricMap {
13321332/// elimination.
13331333///
13341334/// This function is a no-op, and does not even read from `dummy`.
1335- pub fn black_box < T > ( dummy : T ) {
1335+ pub fn black_box < T > ( dummy : T ) -> T {
13361336 // we need to "use" the argument in some way LLVM can't
13371337 // introspect.
13381338 unsafe { asm ! ( "" : : "r" ( & dummy) ) }
1339+ dummy
13391340}
13401341
13411342
You can’t perform that action at this time.
0 commit comments