@@ -217,7 +217,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
217217
218218 fn in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , PrintError >
219219 where
220- T : Print < ' tcx , Self , Error = PrintError > + TypeFoldable < TyCtxt < ' tcx > > ,
220+ T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
221221 {
222222 value. as_ref ( ) . skip_binder ( ) . print ( self )
223223 }
@@ -228,15 +228,15 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
228228 f : F ,
229229 ) -> Result < Self , PrintError >
230230 where
231- T : Print < ' tcx , Self , Error = PrintError > + TypeFoldable < TyCtxt < ' tcx > > ,
231+ T : Print < ' tcx , Self > + 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 , PrintError >
238238 where
239- T : Print < ' tcx , Self , Error = PrintError > ,
239+ T : Print < ' tcx , Self > ,
240240 {
241241 if let Some ( first) = elems. next ( ) {
242242 self = first. print ( self ) ?;
@@ -2083,7 +2083,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
20832083
20842084 fn in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , PrintError >
20852085 where
2086- T : Print < ' tcx , Self , Error = PrintError > + TypeFoldable < TyCtxt < ' tcx > > ,
2086+ T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
20872087 {
20882088 self . pretty_in_binder ( value)
20892089 }
@@ -2094,7 +2094,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
20942094 f : C ,
20952095 ) -> Result < Self , PrintError >
20962096 where
2097- T : Print < ' tcx , Self , Error = PrintError > + TypeFoldable < TyCtxt < ' tcx > > ,
2097+ T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
20982098 {
20992099 self . pretty_wrap_binder ( value, f)
21002100 }
@@ -2343,7 +2343,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
23432343 value : & ty:: Binder < ' tcx , T > ,
23442344 ) -> Result < ( Self , T , BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ) , fmt:: Error >
23452345 where
2346- T : Print < ' tcx , Self , Error = fmt :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2346+ T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
23472347 {
23482348 fn name_by_region_index (
23492349 index : usize ,
@@ -2513,7 +2513,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
25132513
25142514 pub fn pretty_in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , fmt:: Error >
25152515 where
2516- T : Print < ' tcx , Self , Error = fmt :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2516+ T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
25172517 {
25182518 let old_region_index = self . region_index ;
25192519 let ( new, new_value, _) = self . name_all_regions ( value) ?;
@@ -2529,7 +2529,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
25292529 f : C ,
25302530 ) -> Result < Self , fmt:: Error >
25312531 where
2532- T : Print < ' tcx , Self , Error = fmt :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2532+ T : Print < ' tcx , Self > + TypeFoldable < TyCtxt < ' tcx > > ,
25332533 {
25342534 let old_region_index = self . region_index ;
25352535 let ( new, new_value, _) = self . name_all_regions ( value) ?;
@@ -2594,21 +2594,18 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
25942594
25952595impl < ' tcx , T , P : PrettyPrinter < ' tcx > > Print < ' tcx , P > for ty:: Binder < ' tcx , T >
25962596where
2597- T : Print < ' tcx , P , Error = PrintError > + TypeFoldable < TyCtxt < ' tcx > > ,
2597+ T : Print < ' tcx , P > + TypeFoldable < TyCtxt < ' tcx > > ,
25982598{
2599- type Error = PrintError ;
2600-
26012599 fn print ( & self , cx : P ) -> Result < P , PrintError > {
26022600 cx. in_binder ( self )
26032601 }
26042602}
26052603
26062604impl < ' tcx , T , U , P : PrettyPrinter < ' tcx > > Print < ' tcx , P > for ty:: OutlivesPredicate < T , U >
26072605where
2608- T : Print < ' tcx , P , Error = PrintError > ,
2609- U : Print < ' tcx , P , Error = PrintError > ,
2606+ T : Print < ' tcx , P > ,
2607+ U : Print < ' tcx , P > ,
26102608{
2611- type Error = PrintError ;
26122609 fn print ( & self , mut cx : P ) -> Result < P , PrintError > {
26132610 define_scoped_cx ! ( cx) ;
26142611 p ! ( print( self . 0 ) , ": " , print( self . 1 ) ) ;
@@ -2636,7 +2633,6 @@ macro_rules! forward_display_to_print {
26362633macro_rules! define_print_and_forward_display {
26372634 ( ( $self: ident, $cx: ident) : $( $ty: ty $print: block) +) => {
26382635 $( impl <' tcx, P : PrettyPrinter <' tcx>> Print <' tcx, P > for $ty {
2639- type Error = fmt:: Error ;
26402636 fn print( & $self, $cx: P ) -> Result <P , PrintError > {
26412637 #[ allow( unused_mut) ]
26422638 let mut $cx = $cx;
0 commit comments