@@ -646,13 +646,8 @@ pub trait PrettyPrinter<'tcx>:
646
646
ty:: Generator ( did, substs, movability) => {
647
647
p ! ( write( "[" ) ) ;
648
648
match movability {
649
- <<<<<<< HEAD
650
649
hir:: Movability :: Movable => { }
651
650
hir:: Movability :: Static => p ! ( "static " ) ,
652
- =======
653
- hir:: Movability :: Movable => p ! ( "[generator" ) ,
654
- hir:: Movability :: Static => p ! ( "[static generator" ) ,
655
- >>>>>>> 4 bc0ae233aa... updated p! macro to accept literals
656
651
}
657
652
658
653
if !self . tcx ( ) . sess . verbose ( ) {
@@ -691,7 +686,6 @@ pub trait PrettyPrinter<'tcx>:
691
686
p ! ( in_binder( & types) ) ;
692
687
}
693
688
ty:: Closure ( did, substs) => {
694
- <<<<<<< HEAD
695
689
p ! ( write( "[" ) ) ;
696
690
if !self . tcx ( ) . sess . verbose ( ) {
697
691
p ! ( write( "closure" ) ) ;
@@ -703,33 +697,6 @@ pub trait PrettyPrinter<'tcx>:
703
697
} else {
704
698
let span = self . tcx ( ) . hir ( ) . span ( hir_id) ;
705
699
p ! ( write( "@{}" , self . tcx( ) . sess. source_map( ) . span_to_string( span) ) ) ;
706
- =======
707
- p ! ( "[closure" ) ;
708
-
709
- // FIXME(eddyb) should use `def_span`.
710
- if let Some ( did) = did. as_local ( ) {
711
- let hir_id = self . tcx ( ) . hir ( ) . local_def_id_to_hir_id ( did) ;
712
- if self . tcx ( ) . sess . opts . debugging_opts . span_free_formats {
713
- p ! ( "@" , print_def_path( did. to_def_id( ) , substs) ) ;
714
- } else {
715
- let span = self . tcx ( ) . hir ( ) . span ( hir_id) ;
716
- p ! ( write( "@{}" , self . tcx( ) . sess. source_map( ) . span_to_string( span) ) ) ;
717
- }
718
-
719
- if substs. as_closure ( ) . is_valid ( ) {
720
- let upvar_tys = substs. as_closure ( ) . upvar_tys ( ) ;
721
- let mut sep = " " ;
722
- for ( & var_id, upvar_ty) in self
723
- . tcx ( )
724
- . upvars_mentioned ( did)
725
- . as_ref ( )
726
- . iter ( )
727
- . flat_map ( |v| v. keys ( ) )
728
- . zip ( upvar_tys)
729
- {
730
- p ! ( write( "{}{}:" , sep, self . tcx( ) . hir( ) . name( var_id) ) , print( upvar_ty) ) ;
731
- sep = ", " ;
732
- >>>>>>> 4 bc0ae233aa... updated p! macro to accept literals
733
700
}
734
701
} else {
735
702
p ! ( write( "@{}" , self . tcx( ) . def_path_str( did) ) ) ;
@@ -756,17 +723,7 @@ pub trait PrettyPrinter<'tcx>:
756
723
}
757
724
}
758
725
}
759
- <<<<<<< HEAD
760
726
p ! ( "]" ) ;
761
- =======
762
-
763
- if self . tcx ( ) . sess . verbose ( ) && substs. as_closure ( ) . is_valid ( ) {
764
- p ! ( " closure_kind_ty=" , print( substs. as_closure( ) . kind_ty( ) ) ) ;
765
- p ! ( " closure_sig_as_fn_ptr_ty=" , print( substs. as_closure( ) . sig_as_fn_ptr_ty( ) ) ) ;
766
- }
767
-
768
- p ! ( "]" )
769
- >>>>>>> 4 bc0ae233aa... updated p! macro to accept literals
770
727
}
771
728
ty:: Array ( ty, sz) => {
772
729
p ! ( "[" , print( ty) , "; " ) ;
0 commit comments