Skip to content

Commit 18f2895

Browse files
authored
Rollup merge of rust-lang#45151 - Pirh:stdio_default_docs, r=frewsxcv
Document defaults for stdin, stdout, and stderr methods of Command For rust-lang#29370
2 parents 40d61f5 + 210c911 commit 18f2895

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/libstd/process.rs

+18
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,12 @@ impl Command {
552552

553553
/// Configuration for the child process's standard input (stdin) handle.
554554
///
555+
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
556+
/// defaults to [`piped`] when used with `output`.
557+
///
558+
/// [`inherit`]: struct.Stdio.html#method.inherit
559+
/// [`piped`]: struct.Stdio.html#method.piped
560+
///
555561
/// # Examples
556562
///
557563
/// Basic usage:
@@ -572,6 +578,12 @@ impl Command {
572578

573579
/// Configuration for the child process's standard output (stdout) handle.
574580
///
581+
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
582+
/// defaults to [`piped`] when used with `output`.
583+
///
584+
/// [`inherit`]: struct.Stdio.html#method.inherit
585+
/// [`piped`]: struct.Stdio.html#method.piped
586+
///
575587
/// # Examples
576588
///
577589
/// Basic usage:
@@ -592,6 +604,12 @@ impl Command {
592604

593605
/// Configuration for the child process's standard error (stderr) handle.
594606
///
607+
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
608+
/// defaults to [`piped`] when used with `output`.
609+
///
610+
/// [`inherit`]: struct.Stdio.html#method.inherit
611+
/// [`piped`]: struct.Stdio.html#method.piped
612+
///
595613
/// # Examples
596614
///
597615
/// Basic usage:

0 commit comments

Comments
 (0)