about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-09 06:38:22 +0000
committerbors <bors@rust-lang.org>2023-06-09 06:38:22 +0000
commitdcc9028c0ce30c3b37f3ca9faf637a9f3ccd5bcb (patch)
tree9a2d11bec79d77b0a976c003e37f0eff6ec6f498 /compiler/rustc_data_structures/src
parent9c843d9fa322596c7d525c78fa89731ecf7afbfe (diff)
parent009fc56471eec39a6de6476703b4fc407c4324e5 (diff)
downloadrust-dcc9028c0ce30c3b37f3ca9faf637a9f3ccd5bcb.tar.gz
rust-dcc9028c0ce30c3b37f3ca9faf637a9f3ccd5bcb.zip
Auto merge of #112450 - matthiaskrgr:rollup-fdbazkr, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #112323 (Don't mention already-set fields in struct constructor missing field error)
 - #112395 (Add Terminator::InlineAsm conversion from MIR to SMIR)
 - #112411 (add programmerjake to portable-simd cc list)
 - #112428 (Structurally resolve pointee in `check_pat_lit`)
 - #112444 (Don't debug-print `Interned` or `PrivateZst`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/intern.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/intern.rs b/compiler/rustc_data_structures/src/intern.rs
index ba94f3776eb..e0f8c350c2a 100644
--- a/compiler/rustc_data_structures/src/intern.rs
+++ b/compiler/rustc_data_structures/src/intern.rs
@@ -1,5 +1,6 @@
 use crate::stable_hasher::{HashStable, StableHasher};
 use std::cmp::Ordering;
+use std::fmt::{self, Debug};
 use std::hash::{Hash, Hasher};
 use std::ops::Deref;
 use std::ptr;
@@ -20,7 +21,6 @@ mod private {
 /// The `PrivateZst` field means you can pattern match with `Interned(v, _)`
 /// but you can only construct a `Interned` with `new_unchecked`, and not
 /// directly.
-#[derive(Debug)]
 #[rustc_pass_by_value]
 pub struct Interned<'a, T>(pub &'a T, pub private::PrivateZst);
 
@@ -108,5 +108,11 @@ where
     }
 }
 
+impl<T: Debug> Debug for Interned<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        self.0.fmt(f)
+    }
+}
+
 #[cfg(test)]
 mod tests;