@@ -45,6 +45,9 @@ pub struct Program {
45
45
// From opaque type name to item-id. Used during lowering only.
46
46
pub opaque_ty_ids : BTreeMap < Identifier , OpaqueTyId < ChalkIr > > ,
47
47
48
+ /// For each opaque type:
49
+ pub opaque_ty_kinds : BTreeMap < OpaqueTyId < ChalkIr > , TypeKind > ,
50
+
48
51
/// For each opaque type:
49
52
pub opaque_ty_data : BTreeMap < OpaqueTyId < ChalkIr > , Arc < OpaqueTyDatum < ChalkIr > > > ,
50
53
@@ -120,8 +123,8 @@ impl tls::DebugContext for Program {
120
123
opaque_ty_id : OpaqueTyId < ChalkIr > ,
121
124
fmt : & mut fmt:: Formatter < ' _ > ,
122
125
) -> Result < ( ) , fmt:: Error > {
123
- if let Some ( d ) = self . opaque_ty_data . get ( & opaque_ty_id) {
124
- write ! ( fmt, "{:? }" , d . bound . skip_binders ( ) . hidden_ty )
126
+ if let Some ( k ) = self . opaque_ty_kinds . get ( & opaque_ty_id) {
127
+ write ! ( fmt, "{}" , k . name )
125
128
} else {
126
129
fmt. debug_struct ( "InvalidItemId" )
127
130
. field ( "index" , & opaque_ty_id. 0 )
@@ -162,7 +165,7 @@ impl tls::DebugContext for Program {
162
165
opaque_ty : & OpaqueTy < ChalkIr > ,
163
166
fmt : & mut fmt:: Formatter < ' _ > ,
164
167
) -> Result < ( ) , fmt:: Error > {
165
- write ! ( fmt, "impl {:?}" , opaque_ty. opaque_ty_id)
168
+ write ! ( fmt, "{:?}" , opaque_ty. opaque_ty_id)
166
169
}
167
170
168
171
fn debug_ty ( & self , ty : & Ty < ChalkIr > , fmt : & mut fmt:: Formatter < ' _ > ) -> Result < ( ) , fmt:: Error > {
0 commit comments