about summary refs log tree commit diff
path: root/src/bootstrap/bin
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2021-05-21 10:48:36 -0400
committerFelix S. Klock II <pnkfelix@pnkfx.org>2021-05-21 10:48:36 -0400
commitb3218d3d5d4aeed5f08bf761bbeabdbadb922f02 (patch)
tree667bc95b39825e653fc23adfad5af4f4e28b29ba /src/bootstrap/bin
parentfc81ad22c453776de16acf9938976930cf8c9401 (diff)
downloadrust-b3218d3d5d4aeed5f08bf761bbeabdbadb922f02.tar.gz
rust-b3218d3d5d4aeed5f08bf761bbeabdbadb922f02.zip
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!
Diffstat (limited to 'src/bootstrap/bin')
-rw-r--r--src/bootstrap/bin/rustc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index d462dc4d116..4b98abfb308 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -305,7 +305,7 @@ fn format_rusage_data(_child: Child) -> Option<String> {
     };
     // Mac OS X reports the maxrss in bytes, not kb.
     let divisor = if env::consts::OS == "macos" { 1024 } else { 1 };
-    let maxrss = rusage.ru_maxrss + (divisor - 1) / divisor;
+    let maxrss = (rusage.ru_maxrss + (divisor - 1)) / divisor;
 
     let mut init_str = format!(
         "user: {USER_SEC}.{USER_USEC:03} \