@@ -689,7 +689,7 @@ pub trait PrettyPrinter<'tcx>:
689
689
if self . tcx ( ) . sess . verbose ( ) {
690
690
p ! ( write(
691
691
" closure_kind_ty={:?} closure_sig_ty={:?}" ,
692
- substs. as_closure( ) . kind ( did, self . tcx( ) ) ,
692
+ substs. as_closure( ) . kind_ty ( did, self . tcx( ) ) ,
693
693
substs. as_closure( ) . sig_ty( did, self . tcx( ) )
694
694
) ) ;
695
695
}
@@ -698,7 +698,9 @@ pub trait PrettyPrinter<'tcx>:
698
698
} ,
699
699
ty:: Array ( ty, sz) => {
700
700
p ! ( write( "[" ) , print( ty) , write( "; " ) ) ;
701
- if let ConstValue :: Unevaluated ( ..) = sz. val {
701
+ if self . tcx ( ) . sess . verbose ( ) {
702
+ p ! ( write( "{:?}" , sz) ) ;
703
+ } else if let ConstValue :: Unevaluated ( ..) = sz. val {
702
704
// do not try to evalute unevaluated constants. If we are const evaluating an
703
705
// array length anon const, rustc will (with debug assertions) print the
704
706
// constant's path. Which will end up here again.
@@ -855,6 +857,11 @@ pub trait PrettyPrinter<'tcx>:
855
857
) -> Result < Self :: Const , Self :: Error > {
856
858
define_scoped_cx ! ( self ) ;
857
859
860
+ if self . tcx ( ) . sess . verbose ( ) {
861
+ p ! ( write( "Const({:?}: {:?})" , ct. val, ct. ty) ) ;
862
+ return Ok ( self ) ;
863
+ }
864
+
858
865
let u8 = self . tcx ( ) . types . u8 ;
859
866
if let ty:: FnDef ( did, substs) = ct. ty . kind {
860
867
p ! ( print_value_path( did, substs) ) ;
0 commit comments