@@ -451,7 +451,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
451
451
ty:: Adt ( ..) | ty:: Foreign ( _) |
452
452
ty:: Bool | ty:: Char | ty:: Str |
453
453
ty:: Int ( _) | ty:: Uint ( _) | ty:: Float ( _) => {
454
- return self_ty. print_display ( self ) ;
454
+ return self_ty. print ( self ) ;
455
455
}
456
456
457
457
_ => { }
@@ -461,9 +461,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
461
461
self . generic_delimiters ( |mut cx| {
462
462
define_scoped_cx ! ( cx) ;
463
463
464
- p ! ( print_display ( self_ty) ) ;
464
+ p ! ( print ( self_ty) ) ;
465
465
if let Some ( trait_ref) = trait_ref {
466
- p ! ( write( " as " ) , print_display ( trait_ref) ) ;
466
+ p ! ( write( " as " ) , print ( trait_ref) ) ;
467
467
}
468
468
Ok ( cx. printer )
469
469
} )
@@ -484,9 +484,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
484
484
485
485
p ! ( write( "impl " ) ) ;
486
486
if let Some ( trait_ref) = trait_ref {
487
- p ! ( print_display ( trait_ref) , write( " for " ) ) ;
487
+ p ! ( print ( trait_ref) , write( " for " ) ) ;
488
488
}
489
- p ! ( print_display ( self_ty) ) ;
489
+ p ! ( print ( self_ty) ) ;
490
490
491
491
Ok ( cx. printer )
492
492
} )
@@ -578,14 +578,14 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
578
578
}
579
579
}
580
580
581
- p ! ( print_display ( arg) ) ;
581
+ p ! ( print ( arg) ) ;
582
582
}
583
583
584
584
for projection in projection0. into_iter ( ) . chain ( projections) {
585
585
maybe_comma ( & mut cx) ?;
586
586
587
587
p ! ( write( "{}=" , cx. tcx. associated_item( projection. item_def_id) . ident) ,
588
- print_display ( projection. ty) ) ;
588
+ print ( projection. ty) ) ;
589
589
}
590
590
591
591
Ok ( cx. printer )
@@ -877,7 +877,8 @@ impl<F: fmt::Write> FmtPrinter<F> {
877
877
}
878
878
879
879
if self . tcx . sess . verbose ( ) {
880
- return region. print_debug ( self ) ;
880
+ p ! ( write( "{:?}" , region) ) ;
881
+ return Ok ( self . printer ) ;
881
882
}
882
883
883
884
let identify_regions = self . tcx . sess . opts . debugging_opts . identify_regions ;
@@ -965,7 +966,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
965
966
ty:: Ref ( r, ty, mutbl) => {
966
967
p ! ( write( "&" ) ) ;
967
968
if self . print_region_outputs_anything ( r) {
968
- p ! ( print_display ( r) , write( " " ) ) ;
969
+ p ! ( print ( r) , write( " " ) ) ;
969
970
}
970
971
p ! ( print( ty:: TypeAndMut { ty, mutbl } ) )
971
972
}
@@ -1019,7 +1020,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1019
1020
}
1020
1021
p ! ( write( "dyn " ) , print( data) ) ;
1021
1022
if print_r {
1022
- p ! ( write( " + " ) , print_display ( r) , write( ")" ) ) ;
1023
+ p ! ( write( " + " ) , print ( r) , write( ")" ) ) ;
1023
1024
}
1024
1025
}
1025
1026
ty:: Foreign ( def_id) => {
@@ -1033,6 +1034,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1033
1034
p ! ( write( "Placeholder({:?})" , placeholder) )
1034
1035
}
1035
1036
ty:: Opaque ( def_id, substs) => {
1037
+ // FIXME(eddyb) print this with `print_def_path`.
1036
1038
if self . tcx . sess . verbose ( ) {
1037
1039
p ! ( write( "Opaque({:?}, {:?})" , def_id, substs) ) ;
1038
1040
return Ok ( self . printer ) ;
@@ -1045,9 +1047,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1045
1047
// FIXME(eddyb) print this with `print_def_path`.
1046
1048
if let Some ( first) = substs. next ( ) {
1047
1049
p ! ( write( "::<" ) ) ;
1048
- p ! ( print_display ( first) ) ;
1050
+ p ! ( print ( first) ) ;
1049
1051
for subst in substs {
1050
- p ! ( write( ", " ) , print_display ( subst) ) ;
1052
+ p ! ( write( ", " ) , print ( subst) ) ;
1051
1053
}
1052
1054
p ! ( write( ">" ) ) ;
1053
1055
}
@@ -1209,17 +1211,17 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1209
1211
p ! ( write( "(" ) ) ;
1210
1212
let mut inputs = inputs. iter ( ) ;
1211
1213
if let Some ( & ty) = inputs. next ( ) {
1212
- p ! ( print_display ( ty) ) ;
1214
+ p ! ( print ( ty) ) ;
1213
1215
for & ty in inputs {
1214
- p ! ( write( ", " ) , print_display ( ty) ) ;
1216
+ p ! ( write( ", " ) , print ( ty) ) ;
1215
1217
}
1216
1218
if c_variadic {
1217
1219
p ! ( write( ", ..." ) ) ;
1218
1220
}
1219
1221
}
1220
1222
p ! ( write( ")" ) ) ;
1221
1223
if !output. is_unit ( ) {
1222
- p ! ( write( " -> " ) , print_display ( output) ) ;
1224
+ p ! ( write( " -> " ) , print ( output) ) ;
1223
1225
}
1224
1226
1225
1227
Ok ( self . printer )
@@ -1290,7 +1292,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1290
1292
// Push current state to gcx, and restore after writing new_value.
1291
1293
self . config . binder_depth += 1 ;
1292
1294
self . config . region_index = region_index;
1293
- let result = new_value. print_display ( PrintCx {
1295
+ let result = new_value. print ( PrintCx {
1294
1296
tcx : self . tcx ,
1295
1297
printer : self . printer ,
1296
1298
config : self . config ,
0 commit comments