diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index b0d33f9e710..c1ba1260f67 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -168,7 +168,8 @@ fn sum(&self) -> f64 { let mut j = 0; // This inner loop applies `hi`/`lo` summation to each // partial so that the list of partial sums remains exact. - for mut y in &mut partials { + for i in 0..partials.len() { + let mut y: f64 = partials[i]; if x.abs() < y.abs() { mem::swap(&mut x, &mut y); }