Skip to content

Commit 7caf084

Browse files
committed
avoid cycles in mir-dump, take 2
1 parent d9a3f62 commit 7caf084

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_mir/util/pretty.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ fn write_mir_sig(tcx: TyCtxt, src: MirSource, mir: &Mir, w: &mut Write)
324324
MirSource::Promoted(_, i) => write!(w, "{:?} in", i)?
325325
}
326326

327-
write!(w, " {}", tcx.node_path_str(src.item_id()))?;
327+
item_path::with_forced_impl_filename_line(|| { // see notes on #41697 elsewhere
328+
write!(w, " {}", tcx.node_path_str(src.item_id()))
329+
})?;
328330

329331
if let MirSource::Fn(_) = src {
330332
write!(w, "(")?;

0 commit comments

Comments
 (0)