about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-06-05 18:21:15 +0200
committerGitHub <noreply@github.com>2024-06-05 18:21:15 +0200
commitfa58891f992b09dddd42cb90099d54ea04282a9a (patch)
treeec534b3bc7618a8070d918561c1f775dd9103468
parent1c17449ae39ee2d3ab5f7a056db4a23d7f0629b4 (diff)
parente704858b0b41b72da9645f9a51e2e55a482fa5c4 (diff)
downloadrust-fa58891f992b09dddd42cb90099d54ea04282a9a.tar.gz
rust-fa58891f992b09dddd42cb90099d54ea04282a9a.zip
Rollup merge of #126032 - ChrisDenton:update-docs, r=joboet
Update description of the `IsTerminal` example

The example code prompts for input if stdin is a terminal.
-rw-r--r--library/std/src/io/stdio.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index c8968b74b12..9aee2bb5e1c 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -1190,9 +1190,8 @@ pub trait IsTerminal: crate::sealed::Sealed {
     ///
     /// - If you run this example by piping some text to it, e.g. `echo "foo" | path/to/executable`
     ///   it will print: `Hello foo`.
-    /// - If you instead run the example interactively by running the executable directly, it will
-    ///   panic with the message "Expected input to be piped to the process".
-    ///
+    /// - If you instead run the example interactively by running `path/to/executable` directly, it will
+    ///   prompt for input.
     ///
     /// [changes]: io#platform-specific-behavior
     /// [`Stdin`]: crate::io::Stdin