File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,21 @@ pub use python::python_command;
5555pub use rustc:: { aux_build, bare_rustc, rustc, Rustc } ;
5656pub use rustdoc:: { bare_rustdoc, rustdoc, Rustdoc } ;
5757
58- /// [`diff`][mod@diff] is implemented in terms of the [similar] library.
58+ /// Implement common helpers for command wrappers. This assumes that the command wrapper is a struct
59+ /// containing a `cmd: Command` field and a `output` function. The provided helpers are:
60+ ///
61+ /// 1. Generic argument acceptors: `arg` and `args` (delegated to [`Command`]). These are intended
62+ /// to be *fallback* argument acceptors, when specific helpers don't make sense. Prefer to add
63+ /// new specific helper methods over relying on these generic argument providers.
64+ /// 2. Environment manipulation methods: `env`, `env_remove` and `env_clear`: these delegate to
65+ /// methods of the same name on [`Command`].
66+ /// 3. Output and execution: `output`, `run` and `run_fail` are provided. `output` waits for the
67+ /// command to finish running and returns the process's [`Output`]. `run` and `run_fail` are
68+ /// higher-level convenience methods which waits for the command to finish running and assert
69+ /// that the command successfully ran or failed as expected. Prefer `run` and `run_fail` when
70+ /// possible.
71+ ///
72+ /// Example usage:
5973///
6074/// [similar]: https://github.com/mitsuhiko/similar
6175pub use diff:: { diff, Diff } ;
You can’t perform that action at this time.
0 commit comments