mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 03:37:26 +03:00
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 } }
```
This commit is contained in:
@@ -221,7 +221,7 @@ fn from_str(value: &str) -> Result<Self, Self::Err> {
|
||||
}
|
||||
}
|
||||
|
||||
#[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 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user