@@ -275,7 +275,7 @@ pub trait PrettyPrinter<'tcx>:
275275 /// Returns `true` if the region should be printed in
276276 /// optional positions, e.g., `&'a T` or `dyn Tr + 'b`.
277277 /// This is typically the case for all non-`'_` regions.
278- fn region_should_not_be_omitted ( & self , region : ty:: Region < ' _ > ) -> bool ;
278+ fn should_print_region ( & self , region : ty:: Region < ' _ > ) -> bool ;
279279
280280 // Defaults (should not be overridden):
281281
@@ -577,7 +577,7 @@ pub trait PrettyPrinter<'tcx>:
577577 }
578578 ty:: Ref ( r, ty, mutbl) => {
579579 p ! ( "&" ) ;
580- if self . region_should_not_be_omitted ( r) {
580+ if self . should_print_region ( r) {
581581 p ! ( print( r) , " " ) ;
582582 }
583583 p ! ( print( ty:: TypeAndMut { ty, mutbl } ) )
@@ -621,7 +621,7 @@ pub trait PrettyPrinter<'tcx>:
621621 p ! ( print_def_path( def. did, substs) ) ;
622622 }
623623 ty:: Dynamic ( data, r) => {
624- let print_r = self . region_should_not_be_omitted ( r) ;
624+ let print_r = self . should_print_region ( r) ;
625625 if print_r {
626626 p ! ( "(" ) ;
627627 }
@@ -1914,7 +1914,7 @@ impl<'tcx, F: fmt::Write> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx, F> {
19141914 Ok ( inner)
19151915 }
19161916
1917- fn region_should_not_be_omitted ( & self , region : ty:: Region < ' _ > ) -> bool {
1917+ fn should_print_region ( & self , region : ty:: Region < ' _ > ) -> bool {
19181918 let highlight = self . region_highlight_mode ;
19191919 if highlight. region_highlighted ( region) . is_some ( ) {
19201920 return true ;
0 commit comments