@@ -217,7 +217,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx, Error = fmt::Error> + fmt::Write {
217217
218218 fn in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , Self :: Error >
219219 where
220- T : Print < ' tcx , Self , Output = Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
220+ T : Print < ' tcx , Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
221221 {
222222 value. as_ref ( ) . skip_binder ( ) . print ( self )
223223 }
@@ -228,15 +228,15 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx, Error = fmt::Error> + fmt::Write {
228228 f : F ,
229229 ) -> Result < Self , Self :: Error >
230230 where
231- T : Print < ' tcx , Self , Output = Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
231+ T : Print < ' tcx , Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
232232 {
233233 f ( value. as_ref ( ) . skip_binder ( ) , self )
234234 }
235235
236236 /// Prints comma-separated elements.
237237 fn comma_sep < T > ( mut self , mut elems : impl Iterator < Item = T > ) -> Result < Self , Self :: Error >
238238 where
239- T : Print < ' tcx , Self , Output = Self , Error = Self :: Error > ,
239+ T : Print < ' tcx , Self , Error = Self :: Error > ,
240240 {
241241 if let Some ( first) = elems. next ( ) {
242242 self = first. print ( self ) ?;
@@ -2085,7 +2085,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
20852085
20862086 fn in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , Self :: Error >
20872087 where
2088- T : Print < ' tcx , Self , Output = Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2088+ T : Print < ' tcx , Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
20892089 {
20902090 self . pretty_in_binder ( value)
20912091 }
@@ -2096,7 +2096,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
20962096 f : C ,
20972097 ) -> Result < Self , Self :: Error >
20982098 where
2099- T : Print < ' tcx , Self , Output = Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2099+ T : Print < ' tcx , Self , Error = Self :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
21002100 {
21012101 self . pretty_wrap_binder ( value, f)
21022102 }
@@ -2345,7 +2345,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
23452345 value : & ty:: Binder < ' tcx , T > ,
23462346 ) -> Result < ( Self , T , BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ) , fmt:: Error >
23472347 where
2348- T : Print < ' tcx , Self , Output = Self , Error = fmt:: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2348+ T : Print < ' tcx , Self , Error = fmt:: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
23492349 {
23502350 fn name_by_region_index (
23512351 index : usize ,
@@ -2515,7 +2515,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
25152515
25162516 pub fn pretty_in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , fmt:: Error >
25172517 where
2518- T : Print < ' tcx , Self , Output = Self , Error = fmt:: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2518+ T : Print < ' tcx , Self , Error = fmt:: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
25192519 {
25202520 let old_region_index = self . region_index ;
25212521 let ( new, new_value, _) = self . name_all_regions ( value) ?;
@@ -2531,7 +2531,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
25312531 f : C ,
25322532 ) -> Result < Self , fmt:: Error >
25332533 where
2534- T : Print < ' tcx , Self , Output = Self , Error = fmt:: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2534+ T : Print < ' tcx , Self , Error = fmt:: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
25352535 {
25362536 let old_region_index = self . region_index ;
25372537 let ( new, new_value, _) = self . name_all_regions ( value) ?;
@@ -2596,24 +2596,22 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
25962596
25972597impl < ' tcx , T , P : PrettyPrinter < ' tcx > > Print < ' tcx , P > for ty:: Binder < ' tcx , T >
25982598where
2599- T : Print < ' tcx , P , Output = P , Error = P :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2599+ T : Print < ' tcx , P , Error = P :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
26002600{
2601- type Output = P ;
26022601 type Error = P :: Error ;
26032602
2604- fn print ( & self , cx : P ) -> Result < Self :: Output , Self :: Error > {
2603+ fn print ( & self , cx : P ) -> Result < P , Self :: Error > {
26052604 cx. in_binder ( self )
26062605 }
26072606}
26082607
26092608impl < ' tcx , T , U , P : PrettyPrinter < ' tcx > > Print < ' tcx , P > for ty:: OutlivesPredicate < T , U >
26102609where
2611- T : Print < ' tcx , P , Output = P , Error = P :: Error > ,
2612- U : Print < ' tcx , P , Output = P , Error = P :: Error > ,
2610+ T : Print < ' tcx , P , Error = P :: Error > ,
2611+ U : Print < ' tcx , P , Error = P :: Error > ,
26132612{
2614- type Output = P ;
26152613 type Error = P :: Error ;
2616- fn print ( & self , mut cx : P ) -> Result < Self :: Output , Self :: Error > {
2614+ fn print ( & self , mut cx : P ) -> Result < P , Self :: Error > {
26172615 define_scoped_cx ! ( cx) ;
26182616 p ! ( print( self . 0 ) , ": " , print( self . 1 ) ) ;
26192617 Ok ( cx)
@@ -2640,9 +2638,8 @@ macro_rules! forward_display_to_print {
26402638macro_rules! define_print_and_forward_display {
26412639 ( ( $self: ident, $cx: ident) : $( $ty: ty $print: block) +) => {
26422640 $( impl <' tcx, P : PrettyPrinter <' tcx>> Print <' tcx, P > for $ty {
2643- type Output = P ;
26442641 type Error = fmt:: Error ;
2645- fn print( & $self, $cx: P ) -> Result <Self :: Output , Self :: Error > {
2642+ fn print( & $self, $cx: P ) -> Result <P , Self :: Error > {
26462643 #[ allow( unused_mut) ]
26472644 let mut $cx = $cx;
26482645 define_scoped_cx!( $cx) ;
0 commit comments