avoid cycles in mir-dump, take 2

This commit is contained in:
Niko Matsakis 2017-05-11 17:52:39 -04:00
parent d9a3f62433
commit 7caf08447e

View File

@ -324,7 +324,9 @@ fn write_mir_sig(tcx: TyCtxt, src: MirSource, mir: &Mir, w: &mut Write)
MirSource::Promoted(_, i) => write!(w, "{:?} in", i)?
}
write!(w, " {}", tcx.node_path_str(src.item_id()))?;
item_path::with_forced_impl_filename_line(|| { // see notes on #41697 elsewhere
write!(w, " {}", tcx.node_path_str(src.item_id()))
})?;
if let MirSource::Fn(_) = src {
write!(w, "(")?;