about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-01-22 16:03:21 +0800
committerJieyou Xu <jieyouxu@outlook.com>2025-01-29 08:11:01 +0000
commit5f513a6a888b4d71d7949a7d6ff2688c86febd22 (patch)
tree03f2d51dadaaff063ef7f21aee64dba73c95e3af /src
parentdd616d6a16288a0e8d79405650db2e68762a4367 (diff)
downloadrust-5f513a6a888b4d71d7949a7d6ff2688c86febd22.tar.gz
rust-5f513a6a888b4d71d7949a7d6ff2688c86febd22.zip
run-make-support: improve docs for `assert_exit_code`
Diffstat (limited to 'src')
-rw-r--r--src/tools/run-make-support/src/command.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs
index b4dc753ab53..70a72bd1abe 100644
--- a/src/tools/run-make-support/src/command.rs
+++ b/src/tools/run-make-support/src/command.rs
@@ -388,9 +388,13 @@ impl CompletedProcess {
         self
     }
 
+    /// Check the **exit status** of the process. On Unix, this is *not* the **wait status**.
+    ///
+    /// See [`std::process::ExitStatus::code`]. This is not to be confused with
+    /// [`std::process::ExitCode`].
     #[track_caller]
     pub fn assert_exit_code(&self, code: i32) -> &Self {
-        assert!(self.output.status.code() == Some(code));
+        assert_eq!(self.output.status.code(), Some(code));
         self
     }
 }