@@ -45,6 +45,9 @@ pub struct Program {
4545 // From opaque type name to item-id. Used during lowering only.
4646 pub opaque_ty_ids : BTreeMap < Identifier , OpaqueTyId < ChalkIr > > ,
4747
48+ /// For each opaque type:
49+ pub opaque_ty_kinds : BTreeMap < OpaqueTyId < ChalkIr > , TypeKind > ,
50+
4851 /// For each opaque type:
4952 pub opaque_ty_data : BTreeMap < OpaqueTyId < ChalkIr > , Arc < OpaqueTyDatum < ChalkIr > > > ,
5053
@@ -120,8 +123,8 @@ impl tls::DebugContext for Program {
120123 opaque_ty_id : OpaqueTyId < ChalkIr > ,
121124 fmt : & mut fmt:: Formatter < ' _ > ,
122125 ) -> 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 )
125128 } else {
126129 fmt. debug_struct ( "InvalidItemId" )
127130 . field ( "index" , & opaque_ty_id. 0 )
@@ -162,7 +165,7 @@ impl tls::DebugContext for Program {
162165 opaque_ty : & OpaqueTy < ChalkIr > ,
163166 fmt : & mut fmt:: Formatter < ' _ > ,
164167 ) -> Result < ( ) , fmt:: Error > {
165- write ! ( fmt, "impl {:?}" , opaque_ty. opaque_ty_id)
168+ write ! ( fmt, "{:?}" , opaque_ty. opaque_ty_id)
166169 }
167170
168171 fn debug_ty ( & self , ty : & Ty < ChalkIr > , fmt : & mut fmt:: Formatter < ' _ > ) -> Result < ( ) , fmt:: Error > {
0 commit comments