Skip to content

Commit 82d99ad

Browse files
committed
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 } } ```
1 parent bb1a03c commit 82d99ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/config.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl FromStr for LlvmLibunwind {
221221
}
222222
}
223223

224-
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
224+
#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
225225
pub struct TargetSelection {
226226
pub triple: Interned<String>,
227227
file: Option<Interned<String>>,
@@ -276,6 +276,12 @@ impl fmt::Display for TargetSelection {
276276
}
277277
}
278278

279+
impl fmt::Debug for TargetSelection {
280+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
281+
write!(f, "{}", self)
282+
}
283+
}
284+
279285
impl PartialEq<&str> for TargetSelection {
280286
fn eq(&self, other: &&str) -> bool {
281287
self.triple == *other

0 commit comments

Comments
 (0)