]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/process.rs
Auto merge of #105712 - amg98:feat/vita-support, r=wesleywiser
[rust.git] / library / std / src / process.rs
index 17aff342c1599455b2160b43b456bdb8f752246e..62ce2cb33dc55e9df04055a0efc1efe67512e497 100644 (file)
@@ -1038,6 +1038,15 @@ impl fmt::Debug for Command {
     /// Format the program and arguments of a Command for display. Any
     /// non-utf8 data is lossily converted using the utf8 replacement
     /// character.
+    ///
+    /// The default format approximates a shell invocation of the program along with its
+    /// arguments. It does not include most of the other command properties. The output is not guaranteed to work
+    /// (e.g. due to lack of shell-escaping or differences in path resolution)
+    /// On some platforms you can use [the alternate syntax] to show more fields.
+    ///
+    /// Note that the debug implementation is platform-specific.
+    ///
+    /// [the alternate syntax]: fmt#sign0
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         self.inner.fmt(f)
     }
@@ -2155,18 +2164,11 @@ pub fn id() -> u32 {
 /// to provide similar functionality.
 #[cfg_attr(not(test), lang = "termination")]
 #[stable(feature = "termination_trait_lib", since = "1.61.0")]
-#[rustc_on_unimplemented(
-    on(
-        all(not(bootstrap), cause = "MainFunctionType"),
-        message = "`main` has invalid return type `{Self}`",
-        label = "`main` can only return types that implement `{Termination}`"
-    ),
-    on(
-        bootstrap,
-        message = "`main` has invalid return type `{Self}`",
-        label = "`main` can only return types that implement `{Termination}`"
-    )
-)]
+#[rustc_on_unimplemented(on(
+    cause = "MainFunctionType",
+    message = "`main` has invalid return type `{Self}`",
+    label = "`main` can only return types that implement `{Termination}`"
+))]
 pub trait Termination {
     /// Is called to get the representation of the value as status code.
     /// This status code is returned to the operating system.