@@ -307,8 +307,20 @@ impl<'tcx> fmt::Display for ty::TraitTy<'tcx> {
307
307
308
308
impl < ' tcx > fmt:: Debug for ty:: TypeParameterDef < ' tcx > {
309
309
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
310
- write ! ( f, "TypeParameterDef({:?}, {:?}/{})" ,
311
- self . def_id, self . space, self . index)
310
+ write ! ( f, "TypeParameterDef({}, {}:{}, {:?}/{})" ,
311
+ self . name,
312
+ self . def_id. krate, self . def_id. node,
313
+ self . space, self . index)
314
+ }
315
+ }
316
+
317
+ impl fmt:: Debug for ty:: RegionParameterDef {
318
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
319
+ write ! ( f, "RegionParameterDef({}, {}:{}, {:?}/{}, {:?})" ,
320
+ self . name,
321
+ self . def_id. krate, self . def_id. node,
322
+ self . space, self . index,
323
+ self . bounds)
312
324
}
313
325
}
314
326
@@ -388,6 +400,19 @@ impl fmt::Display for ty::BoundRegion {
388
400
}
389
401
}
390
402
403
+ impl fmt:: Debug for ty:: BoundRegion {
404
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
405
+ match * self {
406
+ BrAnon ( n) => write ! ( f, "BrAnon({:?})" , n) ,
407
+ BrFresh ( n) => write ! ( f, "BrFresh({:?})" , n) ,
408
+ BrNamed ( did, name) => {
409
+ write ! ( f, "BrNamed({}:{}, {:?})" , did. krate, did. node, name)
410
+ }
411
+ BrEnv => "BrEnv" . fmt ( f) ,
412
+ }
413
+ }
414
+ }
415
+
391
416
impl fmt:: Debug for ty:: Region {
392
417
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
393
418
match * self {
0 commit comments