@@ -357,7 +357,7 @@ fn visit_fn<'tcx>(
357
357
sp : Span ,
358
358
id : hir:: HirId ,
359
359
) {
360
- debug ! ( "visit_fn" ) ;
360
+ debug ! ( "visit_fn {:?}" , id ) ;
361
361
362
362
// swap in a new set of IR maps for this function body:
363
363
let def_id = ir. tcx . hir ( ) . local_def_id ( id) ;
@@ -777,12 +777,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
777
777
778
778
fn write_vars < F > ( & self , wr : & mut dyn Write , ln : LiveNode , mut test : F ) -> io:: Result < ( ) >
779
779
where
780
- F : FnMut ( usize ) -> LiveNode ,
780
+ F : FnMut ( usize ) -> bool ,
781
781
{
782
782
let node_base_idx = self . idx ( ln, Variable ( 0 ) ) ;
783
783
for var_idx in 0 ..self . ir . num_vars {
784
784
let idx = node_base_idx + var_idx;
785
- if test ( idx) . is_valid ( ) {
785
+ if test ( idx) {
786
786
write ! ( wr, " {:?}" , Variable ( var_idx as u32 ) ) ?;
787
787
}
788
788
}
@@ -795,9 +795,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
795
795
{
796
796
let wr = & mut wr as & mut dyn Write ;
797
797
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 ( ) ) ;
799
799
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
+
801
804
write ! ( wr, " precedes {:?}]" , self . successors[ ln. get( ) ] ) ;
802
805
}
803
806
String :: from_utf8 ( wr) . unwrap ( )
0 commit comments