summaryrefslogtreecommitdiffstats
path: root/library/std/src/process.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /library/std/src/process.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/std/src/process.rs')
-rw-r--r--library/std/src/process.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index 8c1497613..af6bef1a7 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -526,6 +526,7 @@ impl fmt::Debug for ChildStderr {
/// list_dir.status().expect("process failed to execute");
/// ```
#[stable(feature = "process", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "Command")]
pub struct Command {
inner: imp::Command,
}
@@ -607,7 +608,7 @@ impl Command {
///
/// Note that the argument is not passed through a shell, but given
/// literally to the program. This means that shell syntax like quotes,
- /// escaped characters, word splitting, glob patterns, substitution, etc.
+ /// escaped characters, word splitting, glob patterns, variable substitution, etc.
/// have no effect.
///
/// # Examples
@@ -637,7 +638,7 @@ impl Command {
///
/// Note that the arguments are not passed through a shell, but given
/// literally to the program. This means that shell syntax like quotes,
- /// escaped characters, word splitting, glob patterns, substitution, etc.
+ /// escaped characters, word splitting, glob patterns, variable substitution, etc.
/// have no effect.
///
/// # Examples
@@ -1593,7 +1594,7 @@ impl From<io::Stderr> for Stdio {
pub struct ExitStatus(imp::ExitStatus);
/// The default value is one which indicates successful completion.
-#[stable(feature = "process-exitcode-default", since = "1.73.0")]
+#[stable(feature = "process_exitstatus_default", since = "1.73.0")]
impl Default for ExitStatus {
fn default() -> Self {
// Ideally this would be done by ExitCode::default().into() but that is complicated.
@@ -1959,6 +1960,14 @@ impl ExitCode {
}
}
+/// The default value is [`ExitCode::SUCCESS`]
+#[stable(feature = "process_exitcode_default", since = "1.75.0")]
+impl Default for ExitCode {
+ fn default() -> Self {
+ ExitCode::SUCCESS
+ }
+}
+
#[stable(feature = "process_exitcode", since = "1.61.0")]
impl From<u8> for ExitCode {
/// Construct an `ExitCode` from an arbitrary u8 value.
@@ -2196,6 +2205,7 @@ impl Child {
/// process::exit(0x0100);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "process_exit")]
pub fn exit(code: i32) -> ! {
crate::rt::cleanup();
crate::sys::os::exit(code)