File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/rustc_data_structures/src Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11use crate :: stable_hasher:: { HashStable , StableHasher } ;
22use std:: cmp:: Ordering ;
3+ use std:: fmt:: { self , Debug } ;
34use std:: hash:: { Hash , Hasher } ;
45use std:: ops:: Deref ;
56use std:: ptr;
@@ -20,7 +21,6 @@ mod private {
2021/// The `PrivateZst` field means you can pattern match with `Interned(v, _)`
2122/// but you can only construct a `Interned` with `new_unchecked`, and not
2223/// directly.
23- #[ derive( Debug ) ]
2424#[ rustc_pass_by_value]
2525pub struct Interned < ' a , T > ( pub & ' a T , pub private:: PrivateZst ) ;
2626
@@ -108,5 +108,11 @@ where
108108 }
109109}
110110
111+ impl < T : Debug > Debug for Interned < ' _ , T > {
112+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
113+ self . 0 . fmt ( f)
114+ }
115+ }
116+
111117#[ cfg( test) ]
112118mod tests;
You can’t perform that action at this time.
0 commit comments