@@ -217,7 +217,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx, Error = fmt::Error> + fmt::Write {
217
217
218
218
fn in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , Self :: Error >
219
219
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 > > ,
221
221
{
222
222
value. as_ref ( ) . skip_binder ( ) . print ( self )
223
223
}
@@ -228,15 +228,15 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx, Error = fmt::Error> + fmt::Write {
228
228
f : F ,
229
229
) -> Result < Self , Self :: Error >
230
230
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 > > ,
232
232
{
233
233
f ( value. as_ref ( ) . skip_binder ( ) , self )
234
234
}
235
235
236
236
/// Prints comma-separated elements.
237
237
fn comma_sep < T > ( mut self , mut elems : impl Iterator < Item = T > ) -> Result < Self , Self :: Error >
238
238
where
239
- T : Print < ' tcx , Self , Output = Self , Error = Self :: Error > ,
239
+ T : Print < ' tcx , Self , Error = Self :: Error > ,
240
240
{
241
241
if let Some ( first) = elems. next ( ) {
242
242
self = first. print ( self ) ?;
@@ -2085,7 +2085,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
2085
2085
2086
2086
fn in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , Self :: Error >
2087
2087
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 > > ,
2089
2089
{
2090
2090
self . pretty_in_binder ( value)
2091
2091
}
@@ -2096,7 +2096,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
2096
2096
f : C ,
2097
2097
) -> Result < Self , Self :: Error >
2098
2098
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 > > ,
2100
2100
{
2101
2101
self . pretty_wrap_binder ( value, f)
2102
2102
}
@@ -2345,7 +2345,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
2345
2345
value : & ty:: Binder < ' tcx , T > ,
2346
2346
) -> Result < ( Self , T , BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ) , fmt:: Error >
2347
2347
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 > > ,
2349
2349
{
2350
2350
fn name_by_region_index (
2351
2351
index : usize ,
@@ -2515,7 +2515,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
2515
2515
2516
2516
pub fn pretty_in_binder < T > ( self , value : & ty:: Binder < ' tcx , T > ) -> Result < Self , fmt:: Error >
2517
2517
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 > > ,
2519
2519
{
2520
2520
let old_region_index = self . region_index ;
2521
2521
let ( new, new_value, _) = self . name_all_regions ( value) ?;
@@ -2531,7 +2531,7 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
2531
2531
f : C ,
2532
2532
) -> Result < Self , fmt:: Error >
2533
2533
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 > > ,
2535
2535
{
2536
2536
let old_region_index = self . region_index ;
2537
2537
let ( new, new_value, _) = self . name_all_regions ( value) ?;
@@ -2596,24 +2596,22 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
2596
2596
2597
2597
impl < ' tcx , T , P : PrettyPrinter < ' tcx > > Print < ' tcx , P > for ty:: Binder < ' tcx , T >
2598
2598
where
2599
- T : Print < ' tcx , P , Output = P , Error = P :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2599
+ T : Print < ' tcx , P , Error = P :: Error > + TypeFoldable < TyCtxt < ' tcx > > ,
2600
2600
{
2601
- type Output = P ;
2602
2601
type Error = P :: Error ;
2603
2602
2604
- fn print ( & self , cx : P ) -> Result < Self :: Output , Self :: Error > {
2603
+ fn print ( & self , cx : P ) -> Result < P , Self :: Error > {
2605
2604
cx. in_binder ( self )
2606
2605
}
2607
2606
}
2608
2607
2609
2608
impl < ' tcx , T , U , P : PrettyPrinter < ' tcx > > Print < ' tcx , P > for ty:: OutlivesPredicate < T , U >
2610
2609
where
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 > ,
2613
2612
{
2614
- type Output = P ;
2615
2613
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 > {
2617
2615
define_scoped_cx ! ( cx) ;
2618
2616
p ! ( print( self . 0 ) , ": " , print( self . 1 ) ) ;
2619
2617
Ok ( cx)
@@ -2640,9 +2638,8 @@ macro_rules! forward_display_to_print {
2640
2638
macro_rules! define_print_and_forward_display {
2641
2639
( ( $self: ident, $cx: ident) : $( $ty: ty $print: block) +) => {
2642
2640
$( impl <' tcx, P : PrettyPrinter <' tcx>> Print <' tcx, P > for $ty {
2643
- type Output = P ;
2644
2641
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 > {
2646
2643
#[ allow( unused_mut) ]
2647
2644
let mut $cx = $cx;
2648
2645
define_scoped_cx!( $cx) ;
0 commit comments