about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMu001999 <mu001999@outlook.com>2025-05-28 22:59:17 +0800
committerMu001999 <mu001999@outlook.com>2025-05-28 23:00:27 +0800
commit419897c13242001ce3e6642a1bb2db48606f68fb (patch)
tree3724522e9dee4fb36a76a38128741089c10efa51
parentf83ecd82701923c38f847d290a4e0859d8cf0126 (diff)
downloadrust-419897c13242001ce3e6642a1bb2db48606f68fb.tar.gz
rust-419897c13242001ce3e6642a1bb2db48606f68fb.zip
Add cfg for FormatShortCmd
-rw-r--r--src/bootstrap/src/utils/exec.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/src/utils/exec.rs b/src/bootstrap/src/utils/exec.rs
index d07300e21d0..64e46f10563 100644
--- a/src/bootstrap/src/utils/exec.rs
+++ b/src/bootstrap/src/utils/exec.rs
@@ -332,16 +332,19 @@ impl Default for CommandOutput {
 
 /// Helper trait to format both Command and BootstrapCommand as a short execution line,
 /// without all the other details (e.g. environment variables).
+#[cfg(feature = "tracing")]
 pub trait FormatShortCmd {
     fn format_short_cmd(&self) -> String;
 }
 
+#[cfg(feature = "tracing")]
 impl FormatShortCmd for BootstrapCommand {
     fn format_short_cmd(&self) -> String {
         self.command.format_short_cmd()
     }
 }
 
+#[cfg(feature = "tracing")]
 impl FormatShortCmd for Command {
     fn format_short_cmd(&self) -> String {
         let program = Path::new(self.get_program());