Skip to content

Commit b3218d3

Browse files
committed
facepalm: operator precedence fail on my part.
This bug was only visible on mac. Also, print_step_rusage is a relatively new internal feature, that is not heavily used, and has no tests. All of these factors contributed to how this went uncaught this long. Thanks to Josh Triplett for pointing it out!
1 parent fc81ad2 commit b3218d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bin/rustc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn format_rusage_data(_child: Child) -> Option<String> {
305305
};
306306
// Mac OS X reports the maxrss in bytes, not kb.
307307
let divisor = if env::consts::OS == "macos" { 1024 } else { 1 };
308-
let maxrss = rusage.ru_maxrss + (divisor - 1) / divisor;
308+
let maxrss = (rusage.ru_maxrss + (divisor - 1)) / divisor;
309309

310310
let mut init_str = format!(
311311
"user: {USER_SEC}.{USER_USEC:03} \

0 commit comments

Comments
 (0)