about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Marks <807580+SamuelMarks@users.noreply.github.com>2024-09-05 11:37:05 -0500
committerSamuel Marks <807580+SamuelMarks@users.noreply.github.com>2024-09-05 11:37:05 -0500
commit76f352ceb6eab4bf97be3aa3fb7f01d1fd2c6346 (patch)
treed4b12a385bccb38a488abce218c42aa745fe1838
parent0fe65aa68fb097d0c653e64cf7331d990618c032 (diff)
downloadrust-76f352ceb6eab4bf97be3aa3fb7f01d1fd2c6346.tar.gz
rust-76f352ceb6eab4bf97be3aa3fb7f01d1fd2c6346.zip
[library/std/src/process.rs] Update docstring with @joshtriplett's replacement text
-rw-r--r--library/std/src/process.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index 727f8f5ceb6..c25383405c4 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -1937,10 +1937,14 @@ impl crate::error::Error for ExitStatusError {}
 /// to its parent under normal termination.
 ///
 /// `ExitCode` is intended to be consumed only by the standard library (via
-/// [`Termination::report()`]), and intentionally does not provide accessors like
-/// `PartialEq`, `Eq`, or `Hash`. Instead the standard library provides the
-/// canonical `SUCCESS` and `FAILURE` exit codes as well as `From<u8> for
-/// ExitCode` for constructing other arbitrary exit codes.
+/// [`Termination::report()`]). For forwards compatibility with potentially
+/// unusual targets, this type currently does not provide `Eq`, `Hash`, or
+/// access to the raw value. This type does provide `PartialEq` for
+/// comparison, but note that there may potentially be multiple failure
+/// codes, some of which will _not_ compare equal to `ExitCode::FAILURE`.
+/// The standard library provides the canonical `SUCCESS` and `FAILURE`
+/// exit codes as well as `From<u8> for ExitCode` for constructing other
+/// arbitrary exit codes.
 ///
 /// # Portability
 ///