Skip to content

Commit

Permalink
avoid cycles in mir-dump, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed May 16, 2017
1 parent d9a3f62 commit 7caf084
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_mir/util/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, "(")?;
Expand Down

0 comments on commit 7caf084

Please sign in to comment.