File tree 1 file changed +7
-1
lines changed
compiler/rustc_data_structures/src
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: stable_hasher:: { HashStable , StableHasher } ;
2
2
use std:: cmp:: Ordering ;
3
+ use std:: fmt:: { self , Debug } ;
3
4
use std:: hash:: { Hash , Hasher } ;
4
5
use std:: ops:: Deref ;
5
6
use std:: ptr;
@@ -20,7 +21,6 @@ mod private {
20
21
/// The `PrivateZst` field means you can pattern match with `Interned(v, _)`
21
22
/// but you can only construct a `Interned` with `new_unchecked`, and not
22
23
/// directly.
23
- #[ derive( Debug ) ]
24
24
#[ rustc_pass_by_value]
25
25
pub struct Interned < ' a , T > ( pub & ' a T , pub private:: PrivateZst ) ;
26
26
@@ -108,5 +108,11 @@ where
108
108
}
109
109
}
110
110
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
+
111
117
#[ cfg( test) ]
112
118
mod tests;
You can’t perform that action at this time.
0 commit comments