about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJakub Beránek <jakub.beranek@vsb.cz>2024-06-20 13:00:12 +0200
committerJakub Beránek <jakub.beranek@vsb.cz>2024-06-20 13:00:12 +0200
commit3fe4d134dd709404c3e7effb80e4272561874703 (patch)
treeaef12324a726761473fa9740a9d60208c10a89da /src/bootstrap
parentc15293407fe25a29880c8173a392b5f44061a714 (diff)
downloadrust-3fe4d134dd709404c3e7effb80e4272561874703.tar.gz
rust-3fe4d134dd709404c3e7effb80e4272561874703.zip
Appease `clippy`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs2
-rw-r--r--src/bootstrap/src/lib.rs18
-rw-r--r--src/bootstrap/src/utils/exec.rs8
3 files changed, 14 insertions, 14 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 9917d5b7e50..155da246914 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -2320,7 +2320,7 @@ impl Step for ErrorIndex {
             builder.msg(Kind::Test, compiler.stage, "error-index", compiler.host, compiler.host);
         let _time = helpers::timeit(builder);
         builder
-            .run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::PrintOnFailure));
+            .run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::OnlyOnFailure));
         drop(guard);
         // The tests themselves need to link to std, so make sure it is
         // available.
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index c34fc9fa054..9b414b24d2f 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -585,8 +585,8 @@ impl Build {
             BootstrapCommand::from(submodule_git().args(["diff-index", "--quiet", "HEAD"]))
                 .allow_failure()
                 .output_mode(match self.is_verbose() {
-                    true => OutputMode::PrintAll,
-                    false => OutputMode::PrintOutput,
+                    true => OutputMode::All,
+                    false => OutputMode::OnlyOutput,
                 }),
         );
         if has_local_modifications {
@@ -967,15 +967,15 @@ impl Build {
         self.verbose(|| println!("running: {command:?}"));
 
         let output_mode = command.output_mode.unwrap_or_else(|| match self.is_verbose() {
-            true => OutputMode::PrintAll,
-            false => OutputMode::PrintOutput,
+            true => OutputMode::All,
+            false => OutputMode::OnlyOutput,
         });
         let (output, print_error): (io::Result<CommandOutput>, bool) = match output_mode {
-            mode @ (OutputMode::PrintAll | OutputMode::PrintOutput) => (
+            mode @ (OutputMode::All | OutputMode::OnlyOutput) => (
                 command.command.status().map(|status| status.into()),
-                matches!(mode, OutputMode::PrintAll),
+                matches!(mode, OutputMode::All),
             ),
-            OutputMode::PrintOnFailure => (command.command.output().map(|o| o.into()), true),
+            OutputMode::OnlyOnFailure => (command.command.output().map(|o| o.into()), true),
         };
 
         let output = match output {
@@ -1026,8 +1026,8 @@ impl Build {
     fn run(&self, cmd: &mut Command) {
         self.run_cmd(BootstrapCommand::from(cmd).fail_fast().output_mode(
             match self.is_verbose() {
-                true => OutputMode::PrintAll,
-                false => OutputMode::PrintOutput,
+                true => OutputMode::All,
+                false => OutputMode::OnlyOutput,
             },
         ));
     }
diff --git a/src/bootstrap/src/utils/exec.rs b/src/bootstrap/src/utils/exec.rs
index 784d46a282f..2ac87961915 100644
--- a/src/bootstrap/src/utils/exec.rs
+++ b/src/bootstrap/src/utils/exec.rs
@@ -16,11 +16,11 @@ pub enum BehaviorOnFailure {
 pub enum OutputMode {
     /// Print both the output (by inheriting stdout/stderr) and also the command itself, if it
     /// fails.
-    PrintAll,
+    All,
     /// Print the output (by inheriting stdout/stderr).
-    PrintOutput,
+    OnlyOutput,
     /// Suppress the output if the command succeeds, otherwise print the output.
-    PrintOnFailure,
+    OnlyOnFailure,
 }
 
 /// Wrapper around `std::process::Command`.
@@ -46,7 +46,7 @@ impl<'a> BootstrapCommand<'a> {
 
     /// Do not print the output of the command, unless it fails.
     pub fn quiet(self) -> Self {
-        self.output_mode(OutputMode::PrintOnFailure)
+        self.output_mode(OutputMode::OnlyOnFailure)
     }
 
     pub fn output_mode(self, output_mode: OutputMode) -> Self {