@@ -454,7 +454,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
454
454
ty:: Adt ( ..) | ty:: Foreign ( _) |
455
455
ty:: Bool | ty:: Char | ty:: Str |
456
456
ty:: Int ( _) | ty:: Uint ( _) | ty:: Float ( _) => {
457
- return self_ty. print_display ( self ) ;
457
+ return self_ty. print ( self ) ;
458
458
}
459
459
460
460
_ => { }
@@ -464,9 +464,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
464
464
self . generic_delimiters ( |mut cx| {
465
465
define_scoped_cx ! ( cx) ;
466
466
467
- p ! ( print_display ( self_ty) ) ;
467
+ p ! ( print ( self_ty) ) ;
468
468
if let Some ( trait_ref) = trait_ref {
469
- p ! ( write( " as " ) , print_display ( trait_ref) ) ;
469
+ p ! ( write( " as " ) , print ( trait_ref) ) ;
470
470
}
471
471
Ok ( cx. printer )
472
472
} )
@@ -487,9 +487,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
487
487
488
488
p ! ( write( "impl " ) ) ;
489
489
if let Some ( trait_ref) = trait_ref {
490
- p ! ( print_display ( trait_ref) , write( " for " ) ) ;
490
+ p ! ( print ( trait_ref) , write( " for " ) ) ;
491
491
}
492
- p ! ( print_display ( self_ty) ) ;
492
+ p ! ( print ( self_ty) ) ;
493
493
494
494
Ok ( cx. printer )
495
495
} )
@@ -580,14 +580,14 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
580
580
}
581
581
}
582
582
583
- p ! ( print_display ( arg) ) ;
583
+ p ! ( print ( arg) ) ;
584
584
}
585
585
586
586
for projection in projection0. into_iter ( ) . chain ( projections) {
587
587
maybe_comma ( & mut cx) ?;
588
588
589
589
p ! ( write( "{}=" , cx. tcx. associated_item( projection. item_def_id) . ident) ,
590
- print_display ( projection. ty) ) ;
590
+ print ( projection. ty) ) ;
591
591
}
592
592
593
593
Ok ( cx. printer )
@@ -879,7 +879,8 @@ impl<F: fmt::Write> FmtPrinter<F> {
879
879
}
880
880
881
881
if self . tcx . sess . verbose ( ) {
882
- return region. print_debug ( self ) ;
882
+ p ! ( write( "{:?}" , region) ) ;
883
+ return Ok ( self . printer ) ;
883
884
}
884
885
885
886
let identify_regions = self . tcx . sess . opts . debugging_opts . identify_regions ;
@@ -967,7 +968,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
967
968
ty:: Ref ( r, ty, mutbl) => {
968
969
p ! ( write( "&" ) ) ;
969
970
if self . print_region_outputs_anything ( r) {
970
- p ! ( print_display ( r) , write( " " ) ) ;
971
+ p ! ( print ( r) , write( " " ) ) ;
971
972
}
972
973
p ! ( print( ty:: TypeAndMut { ty, mutbl } ) )
973
974
}
@@ -1021,7 +1022,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1021
1022
}
1022
1023
p ! ( write( "dyn " ) , print( data) ) ;
1023
1024
if print_r {
1024
- p ! ( write( " + " ) , print_display ( r) , write( ")" ) ) ;
1025
+ p ! ( write( " + " ) , print ( r) , write( ")" ) ) ;
1025
1026
}
1026
1027
}
1027
1028
ty:: Foreign ( def_id) => {
@@ -1035,6 +1036,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1035
1036
p ! ( write( "Placeholder({:?})" , placeholder) )
1036
1037
}
1037
1038
ty:: Opaque ( def_id, substs) => {
1039
+ // FIXME(eddyb) print this with `print_def_path`.
1038
1040
if self . tcx . sess . verbose ( ) {
1039
1041
p ! ( write( "Opaque({:?}, {:?})" , def_id, substs) ) ;
1040
1042
return Ok ( self . printer ) ;
@@ -1047,9 +1049,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1047
1049
// FIXME(eddyb) print this with `print_def_path`.
1048
1050
if let Some ( first) = substs. next ( ) {
1049
1051
p ! ( write( "::<" ) ) ;
1050
- p ! ( print_display ( first) ) ;
1052
+ p ! ( print ( first) ) ;
1051
1053
for subst in substs {
1052
- p ! ( write( ", " ) , print_display ( subst) ) ;
1054
+ p ! ( write( ", " ) , print ( subst) ) ;
1053
1055
}
1054
1056
p ! ( write( ">" ) ) ;
1055
1057
}
@@ -1198,17 +1200,17 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1198
1200
p ! ( write( "(" ) ) ;
1199
1201
let mut inputs = inputs. iter ( ) ;
1200
1202
if let Some ( & ty) = inputs. next ( ) {
1201
- p ! ( print_display ( ty) ) ;
1203
+ p ! ( print ( ty) ) ;
1202
1204
for & ty in inputs {
1203
- p ! ( write( ", " ) , print_display ( ty) ) ;
1205
+ p ! ( write( ", " ) , print ( ty) ) ;
1204
1206
}
1205
1207
if variadic {
1206
1208
p ! ( write( ", ..." ) ) ;
1207
1209
}
1208
1210
}
1209
1211
p ! ( write( ")" ) ) ;
1210
1212
if !output. is_unit ( ) {
1211
- p ! ( write( " -> " ) , print_display ( output) ) ;
1213
+ p ! ( write( " -> " ) , print ( output) ) ;
1212
1214
}
1213
1215
1214
1216
Ok ( self . printer )
@@ -1279,7 +1281,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1279
1281
// Push current state to gcx, and restore after writing new_value.
1280
1282
self . config . binder_depth += 1 ;
1281
1283
self . config . region_index = region_index;
1282
- let result = new_value. print_display ( PrintCx {
1284
+ let result = new_value. print ( PrintCx {
1283
1285
tcx : self . tcx ,
1284
1286
printer : self . printer ,
1285
1287
config : self . config ,
0 commit comments