@@ -647,11 +647,11 @@ pub trait PrettyPrinter<'tcx>:
647
647
p ! ( write( "[" ) ) ;
648
648
match movability {
649
649
hir:: Movability :: Movable => { }
650
- hir:: Movability :: Static => p ! ( write ( "static " ) ) ,
650
+ hir:: Movability :: Static => p ! ( "static " ) ,
651
651
}
652
652
653
653
if !self . tcx ( ) . sess . verbose ( ) {
654
- p ! ( write ( "generator" ) ) ;
654
+ p ! ( "generator" ) ;
655
655
// FIXME(eddyb) should use `def_span`.
656
656
if let Some ( did) = did. as_local ( ) {
657
657
let hir_id = self . tcx ( ) . hir ( ) . local_def_id_to_hir_id ( did) ;
@@ -664,15 +664,15 @@ pub trait PrettyPrinter<'tcx>:
664
664
p ! ( print_def_path( did, substs) ) ;
665
665
if substs. as_generator ( ) . is_valid ( ) {
666
666
// Search for the first inference variable
667
- p ! ( write ( " upvar_tys=(" ) ) ;
667
+ p ! ( " upvar_tys=(" ) ;
668
668
let mut uninferred_ty =
669
669
substs. as_generator ( ) . upvar_tys ( ) . filter ( |ty| ty. is_ty_infer ( ) ) ;
670
670
if uninferred_ty. next ( ) . is_some ( ) {
671
671
p ! ( write( "unavailable" ) ) ;
672
672
} else {
673
673
self = self . comma_sep ( substs. as_generator ( ) . upvar_tys ( ) ) ?;
674
674
}
675
- p ! ( write ( ")" ) ) ;
675
+ p ! ( ")" ) ;
676
676
}
677
677
}
678
678
@@ -693,7 +693,7 @@ pub trait PrettyPrinter<'tcx>:
693
693
if let Some ( did) = did. as_local ( ) {
694
694
let hir_id = self . tcx ( ) . hir ( ) . local_def_id_to_hir_id ( did) ;
695
695
if self . tcx ( ) . sess . opts . debugging_opts . span_free_formats {
696
- p ! ( write ( "@" ) , print_def_path( did. to_def_id( ) , substs) ) ;
696
+ p ! ( "@" , print_def_path( did. to_def_id( ) , substs) ) ;
697
697
} else {
698
698
let span = self . tcx ( ) . hir ( ) . span ( hir_id) ;
699
699
p ! ( write( "@{}" , self . tcx( ) . sess. source_map( ) . span_to_string( span) ) ) ;
@@ -710,20 +710,20 @@ pub trait PrettyPrinter<'tcx>:
710
710
if uninferred_ty. next ( ) . is_some ( ) {
711
711
// If the upvar substs contain an inference variable we haven't
712
712
// finished capture analysis.
713
- p ! ( write ( " closure_substs=(unavailable)" ) ) ;
713
+ p ! ( " closure_substs=(unavailable)" ) ;
714
714
} else {
715
- p ! ( write ( " closure_kind_ty=" ) , print( substs. as_closure( ) . kind_ty( ) ) ) ;
715
+ p ! ( " closure_kind_ty=" , print( substs. as_closure( ) . kind_ty( ) ) ) ;
716
716
p ! (
717
- write ( " closure_sig_as_fn_ptr_ty=" ) ,
717
+ " closure_sig_as_fn_ptr_ty=" ,
718
718
print( substs. as_closure( ) . sig_as_fn_ptr_ty( ) )
719
719
) ;
720
- p ! ( write ( " upvar_tys=(" ) ) ;
720
+ p ! ( " upvar_tys=(" ) ;
721
721
self = self . comma_sep ( substs. as_closure ( ) . upvar_tys ( ) ) ?;
722
- p ! ( write ( ")" ) ) ;
722
+ p ! ( ")" ) ;
723
723
}
724
724
}
725
725
}
726
- p ! ( write ( "]" ) ) ;
726
+ p ! ( "]" ) ;
727
727
}
728
728
ty:: Array ( ty, sz) => {
729
729
p ! ( "[" , print( ty) , "; " ) ;
0 commit comments