]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #23127 - alexcrichton:bench-wrapping, r=brson
authorbors <bors@rust-lang.org>
Sun, 8 Mar 2015 08:34:56 +0000 (08:34 +0000)
committerbors <bors@rust-lang.org>
Sun, 8 Mar 2015 08:34:56 +0000 (08:34 +0000)
Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

    #[bench]
    fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.

1  2 
src/libtest/lib.rs

Simple merge