@@ -233,11 +233,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
233
233
self . print_def_path ( def_id, args)
234
234
}
235
235
236
- fn in_binder < T > (
237
- & mut self ,
238
- value : & ty:: Binder < ' tcx , T > ,
239
- _mode : WrapBinderMode ,
240
- ) -> Result < ( ) , PrintError >
236
+ fn print_in_binder < T > ( & mut self , value : & ty:: Binder < ' tcx , T > ) -> Result < ( ) , PrintError >
241
237
where
242
238
T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
243
239
{
@@ -2391,15 +2387,11 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
2391
2387
Ok ( ( ) )
2392
2388
}
2393
2389
2394
- fn in_binder < T > (
2395
- & mut self ,
2396
- value : & ty:: Binder < ' tcx , T > ,
2397
- mode : WrapBinderMode ,
2398
- ) -> Result < ( ) , PrintError >
2390
+ fn print_in_binder < T > ( & mut self , value : & ty:: Binder < ' tcx , T > ) -> Result < ( ) , PrintError >
2399
2391
where
2400
2392
T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
2401
2393
{
2402
- self . pretty_in_binder ( value, mode )
2394
+ self . pretty_print_in_binder ( value)
2403
2395
}
2404
2396
2405
2397
fn wrap_binder < T , C : FnOnce ( & T , & mut Self ) -> Result < ( ) , PrintError > > (
@@ -2835,16 +2827,15 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
2835
2827
Ok ( ( new_value, map) )
2836
2828
}
2837
2829
2838
- pub fn pretty_in_binder < T > (
2830
+ pub fn pretty_print_in_binder < T > (
2839
2831
& mut self ,
2840
2832
value : & ty:: Binder < ' tcx , T > ,
2841
- mode : WrapBinderMode ,
2842
2833
) -> Result < ( ) , fmt:: Error >
2843
2834
where
2844
2835
T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
2845
2836
{
2846
2837
let old_region_index = self . region_index ;
2847
- let ( new_value, _) = self . name_all_regions ( value, mode ) ?;
2838
+ let ( new_value, _) = self . name_all_regions ( value, WrapBinderMode :: ForAll ) ?;
2848
2839
new_value. print ( self ) ?;
2849
2840
self . region_index = old_region_index;
2850
2841
self . binder_depth -= 1 ;
@@ -2920,7 +2911,7 @@ where
2920
2911
T : Print < ' tcx , P > + TypeFoldable < TyCtxt < ' tcx > > ,
2921
2912
{
2922
2913
fn print ( & self , cx : & mut P ) -> Result < ( ) , PrintError > {
2923
- cx. in_binder ( self , WrapBinderMode :: ForAll )
2914
+ cx. print_in_binder ( self )
2924
2915
}
2925
2916
}
2926
2917
0 commit comments