@@ -357,7 +357,7 @@ fn visit_fn<'tcx>(
357357 sp : Span ,
358358 id : hir:: HirId ,
359359) {
360- debug ! ( "visit_fn" ) ;
360+ debug ! ( "visit_fn {:?}" , id ) ;
361361
362362 // swap in a new set of IR maps for this function body:
363363 let def_id = ir. tcx . hir ( ) . local_def_id ( id) ;
@@ -777,12 +777,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
777777
778778 fn write_vars < F > ( & self , wr : & mut dyn Write , ln : LiveNode , mut test : F ) -> io:: Result < ( ) >
779779 where
780- F : FnMut ( usize ) -> LiveNode ,
780+ F : FnMut ( usize ) -> bool ,
781781 {
782782 let node_base_idx = self . idx ( ln, Variable ( 0 ) ) ;
783783 for var_idx in 0 ..self . ir . num_vars {
784784 let idx = node_base_idx + var_idx;
785- if test ( idx) . is_valid ( ) {
785+ if test ( idx) {
786786 write ! ( wr, " {:?}" , Variable ( var_idx as u32 ) ) ?;
787787 }
788788 }
@@ -795,9 +795,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
795795 {
796796 let wr = & mut wr as & mut dyn Write ;
797797 write ! ( wr, "[ln({:?}) of kind {:?} reads" , ln. get( ) , self . ir. lnk( ln) ) ;
798- self . write_vars ( wr, ln, |idx| self . rwu_table . get_reader ( idx) ) ;
798+ self . write_vars ( wr, ln, |idx| self . rwu_table . get_reader ( idx) . is_valid ( ) ) ;
799799 write ! ( wr, " writes" ) ;
800- self . write_vars ( wr, ln, |idx| self . rwu_table . get_writer ( idx) ) ;
800+ self . write_vars ( wr, ln, |idx| self . rwu_table . get_writer ( idx) . is_valid ( ) ) ;
801+ write ! ( wr, " uses" ) ;
802+ self . write_vars ( wr, ln, |idx| self . rwu_table . get_used ( idx) ) ;
803+
801804 write ! ( wr, " precedes {:?}]" , self . successors[ ln. get( ) ] ) ;
802805 }
803806 String :: from_utf8 ( wr) . unwrap ( )
0 commit comments