@@ -450,7 +450,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
450
450
ty:: Adt ( ..) | ty:: Foreign ( _) |
451
451
ty:: Bool | ty:: Char | ty:: Str |
452
452
ty:: Int ( _) | ty:: Uint ( _) | ty:: Float ( _) => {
453
- return self_ty. print_display ( self ) ;
453
+ return self_ty. print ( self ) ;
454
454
}
455
455
456
456
_ => { }
@@ -460,9 +460,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
460
460
self . generic_delimiters ( |mut cx| {
461
461
define_scoped_cx ! ( cx) ;
462
462
463
- p ! ( print_display ( self_ty) ) ;
463
+ p ! ( print ( self_ty) ) ;
464
464
if let Some ( trait_ref) = trait_ref {
465
- p ! ( write( " as " ) , print_display ( trait_ref) ) ;
465
+ p ! ( write( " as " ) , print ( trait_ref) ) ;
466
466
}
467
467
Ok ( cx. printer )
468
468
} )
@@ -483,9 +483,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
483
483
484
484
p ! ( write( "impl " ) ) ;
485
485
if let Some ( trait_ref) = trait_ref {
486
- p ! ( print_display ( trait_ref) , write( " for " ) ) ;
486
+ p ! ( print ( trait_ref) , write( " for " ) ) ;
487
487
}
488
- p ! ( print_display ( self_ty) ) ;
488
+ p ! ( print ( self_ty) ) ;
489
489
490
490
Ok ( cx. printer )
491
491
} )
@@ -576,14 +576,14 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
576
576
}
577
577
}
578
578
579
- p ! ( print_display ( arg) ) ;
579
+ p ! ( print ( arg) ) ;
580
580
}
581
581
582
582
for projection in projection0. into_iter ( ) . chain ( projections) {
583
583
maybe_comma ( & mut cx) ?;
584
584
585
585
p ! ( write( "{}=" , cx. tcx. associated_item( projection. item_def_id) . ident) ,
586
- print_display ( projection. ty) ) ;
586
+ print ( projection. ty) ) ;
587
587
}
588
588
589
589
Ok ( cx. printer )
@@ -875,7 +875,8 @@ impl<F: fmt::Write> FmtPrinter<F> {
875
875
}
876
876
877
877
if self . tcx . sess . verbose ( ) {
878
- return region. print_debug ( self ) ;
878
+ p ! ( write( "{:?}" , region) ) ;
879
+ return Ok ( self . printer ) ;
879
880
}
880
881
881
882
let identify_regions = self . tcx . sess . opts . debugging_opts . identify_regions ;
@@ -963,7 +964,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
963
964
ty:: Ref ( r, ty, mutbl) => {
964
965
p ! ( write( "&" ) ) ;
965
966
if self . print_region_outputs_anything ( r) {
966
- p ! ( print_display ( r) , write( " " ) ) ;
967
+ p ! ( print ( r) , write( " " ) ) ;
967
968
}
968
969
p ! ( print( ty:: TypeAndMut { ty, mutbl } ) )
969
970
}
@@ -1017,7 +1018,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1017
1018
}
1018
1019
p ! ( write( "dyn " ) , print( data) ) ;
1019
1020
if print_r {
1020
- p ! ( write( " + " ) , print_display ( r) , write( ")" ) ) ;
1021
+ p ! ( write( " + " ) , print ( r) , write( ")" ) ) ;
1021
1022
}
1022
1023
}
1023
1024
ty:: Foreign ( def_id) => {
@@ -1031,6 +1032,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1031
1032
p ! ( write( "Placeholder({:?})" , placeholder) )
1032
1033
}
1033
1034
ty:: Opaque ( def_id, substs) => {
1035
+ // FIXME(eddyb) print this with `print_def_path`.
1034
1036
if self . tcx . sess . verbose ( ) {
1035
1037
p ! ( write( "Opaque({:?}, {:?})" , def_id, substs) ) ;
1036
1038
return Ok ( self . printer ) ;
@@ -1043,9 +1045,9 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1043
1045
// FIXME(eddyb) print this with `print_def_path`.
1044
1046
if let Some ( first) = substs. next ( ) {
1045
1047
p ! ( write( "::<" ) ) ;
1046
- p ! ( print_display ( first) ) ;
1048
+ p ! ( print ( first) ) ;
1047
1049
for subst in substs {
1048
- p ! ( write( ", " ) , print_display ( subst) ) ;
1050
+ p ! ( write( ", " ) , print ( subst) ) ;
1049
1051
}
1050
1052
p ! ( write( ">" ) ) ;
1051
1053
}
@@ -1194,17 +1196,17 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1194
1196
p ! ( write( "(" ) ) ;
1195
1197
let mut inputs = inputs. iter ( ) ;
1196
1198
if let Some ( & ty) = inputs. next ( ) {
1197
- p ! ( print_display ( ty) ) ;
1199
+ p ! ( print ( ty) ) ;
1198
1200
for & ty in inputs {
1199
- p ! ( write( ", " ) , print_display ( ty) ) ;
1201
+ p ! ( write( ", " ) , print ( ty) ) ;
1200
1202
}
1201
1203
if variadic {
1202
1204
p ! ( write( ", ..." ) ) ;
1203
1205
}
1204
1206
}
1205
1207
p ! ( write( ")" ) ) ;
1206
1208
if !output. is_unit ( ) {
1207
- p ! ( write( " -> " ) , print_display ( output) ) ;
1209
+ p ! ( write( " -> " ) , print ( output) ) ;
1208
1210
}
1209
1211
1210
1212
Ok ( self . printer )
@@ -1275,7 +1277,7 @@ impl<'gcx, 'tcx, P: PrettyPrinter> PrintCx<'_, 'gcx, 'tcx, P> {
1275
1277
// Push current state to gcx, and restore after writing new_value.
1276
1278
self . config . binder_depth += 1 ;
1277
1279
self . config . region_index = region_index;
1278
- let result = new_value. print_display ( PrintCx {
1280
+ let result = new_value. print ( PrintCx {
1279
1281
tcx : self . tcx ,
1280
1282
printer : self . printer ,
1281
1283
config : self . config ,
0 commit comments