diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-17 00:07:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-17 00:07:25 +0200 |
| commit | ff91155d0abbe6bbbffdca487cec574c8aa2c2a5 (patch) | |
| tree | 254d1a09b1b0077d77efbe6d1fdbf6b8852cefb1 /src | |
| parent | 0b43f70321df290f758cb4f835f861c4ea95d009 (diff) | |
| parent | 82d99ad8548a7c6eb9de059554897865d3de96d2 (diff) | |
| download | rust-ff91155d0abbe6bbbffdca487cec574c8aa2c2a5.tar.gz rust-ff91155d0abbe6bbbffdca487cec574c8aa2c2a5.zip | |
Rollup merge of #96105 - jyn514:less-verbose-logging, r=Mark-Simulacrum
Make the debug output for `TargetSelection` less verbose
In particular, this makes the output of `x build -vv` easier to read.
Before:
```
c Sysroot { compiler: Compiler { stage: 0, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } } }
```
After:
```
c Sysroot { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu } }
```
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/config.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 9534cc5f434..d7c29f6900a 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -221,7 +221,7 @@ impl FromStr for LlvmLibunwind { } } -#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct TargetSelection { pub triple: Interned<String>, file: Option<Interned<String>>, @@ -276,6 +276,12 @@ impl fmt::Display for TargetSelection { } } +impl fmt::Debug for TargetSelection { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self) + } +} + impl PartialEq<&str> for TargetSelection { fn eq(&self, other: &&str) -> bool { self.triple == *other |
