Skip to content

Commit b577b26

Browse files
committed
Add stdio configuring to run-make Rustc
1 parent ad7d41c commit b577b26

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/tools/run-make-support/src/macros.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,30 @@ macro_rules! impl_common_helpers {
7070
self
7171
}
7272

73+
/// Configuration for the child process’s standard input (stdin) handle.
74+
///
75+
/// See [`std::process::Command::stdin`].
76+
pub fn stdin<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self {
77+
self.cmd.stdin(cfg);
78+
self
79+
}
80+
81+
/// Configuration for the child process’s standard output (stdout) handle.
82+
///
83+
/// See [`std::process::Command::stdout`].
84+
pub fn stdout<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self {
85+
self.cmd.stdout(cfg);
86+
self
87+
}
88+
89+
/// Configuration for the child process’s standard error (stderr) handle.
90+
///
91+
/// See [`std::process::Command::stderr`].
92+
pub fn stderr<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self {
93+
self.cmd.stderr(cfg);
94+
self
95+
}
96+
7397
/// Inspect what the underlying [`Command`] is up to the
7498
/// current construction.
7599
pub fn inspect<I>(&mut self, inspector: I) -> &mut Self

0 commit comments

Comments
 (0)