pub fn write_mir_pretty<'a, 'b, 'tcx, I>(tcx: TyCtxt<'b, 'tcx, 'tcx>,
                                         iter: I,
                                         w: &mut Write)
                                         -> io::Result<()>
    where I: Iterator<Item=(&'a NodeId, &'a Mir<'tcx>)>, 'tcx: 'a
{
    let mut first = true;
    for (&id, mir) in iter {
        if first {
            first = false;
        } else {
            // Put empty lines between all items
            writeln!(w, "")?;
        }

        let src = MirSource::from_node(tcx, id);
        write_mir_fn(tcx, src, mir, w, None)?;

        for (i, mir) in mir.promoted.iter_enumerated() {
            writeln!(w, "")?;
            write_mir_fn(tcx, MirSource::Promoted(id, i), mir, w, None)?;
        }
    }
    Ok(())
}
/// Write out a human-readable textual representation for the given MIR.
Write out a human-readable textual representation for the given MIR.
Write out a human - readable textual representation for the given MIR .
pub fn write_mir_pretty<'a, 'b, 'tcx, I>(tcx: TyCtxt<'b, 'tcx, 'tcx>,
                                         iter: I,
                                         w: &mut Write)
                                         -> io::Result<()>
    where I: Iterator<Item=(&'a NodeId, &'a Mir<'tcx>)>, 'tcx: 'a
{
    let mut first = true;
    for (&id, mir) in iter {
        if first {
            first = false;
        } else {
            // Put empty lines between all items
            writeln!(w, "")?;
        }
        let src = MirSource::from_node(tcx, id);
        write_mir_fn(tcx, src, mir, w, None)?;
        for (i, mir) in mir.promoted.iter_enumerated() {
            writeln!(w, "")?;
            write_mir_fn(tcx, MirSource::Promoted(id, i), mir, w, None)?;
        }
    }
    Ok(())
}
pub fn write_mir_pretty < ' a , ' b , ' tcx , I > ( tcx : TyCtxt < ' b , ' tcx , ' tcx > , iter : I , w : & mut Write ) -> io :: Result < ( ) > where I : Iterator < Item = ( & ' a NodeId , & ' a Mir < ' tcx > ) > , ' tcx : ' a { let mut first = true ; for ( & id , mir ) in iter { if first { first = false ; } else { // Put empty lines between all items writeln ! ( w " " ) ? ; } let src = MirSource :: from_node ( tcx , id ) ; write_mir_fn ( tcx , src , mir , w , None ) ? ; for ( i , mir ) in mir . promoted . iter_enumerated ( ) { writeln ! ( w " " ) ? ; write_mir_fn ( tcx , MirSource :: Promoted ( id , i ) , mir , w , None ) ? ; } } Ok ( ( ) ) }
Write out a human-readable textual representation for the given MIR.
Write out a human - readable textual representation for the given MIR .
tcx
TyCtxt<'b, 'tcx, 'tcx>
iter
I
w
&mut Write
tcx
TyCtxt<'b, 'tcx, 'tcx>
iter
I
w
&mut Write